• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Calculate values based upon duplicate dates in another column.|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Calculate values based upon duplicate dates in another column.|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryCalculate values based upon duplica…
sp_PrintTopic sp_TopicIcon
Calculate values based upon duplicate dates in another column.
Avatar
Allison Parker
Member
Members

Power Query

Power Pivot

Power BI
Level 0
Forum Posts: 10
Member Since:
January 29, 2019
sp_UserOfflineSmall Offline
1
August 10, 2019 - 5:40 am
sp_Permalink sp_Print

HI Mynda,

 

We run data reports several times within the same month. The values change monthly based upon who did not pay their bill etc.Ex: If I ran June data in July it showed 100 people. Say 10 people don't pay their bill, when I run the June data again, it will show 80.

If: Report Data (June) = Report data (June row above) then Value - value (row above)

I want to add a column for variance between the two values, in this example it would be 20.

I can calculate this within Excel. I am looking on how to calculate within Power Query? I cannot use an index for the calculation as I need the calculation to recognize the difference in the month.

I"m attaching a screenshot of the actual report.  Will you please review and advise if this is possible? I've done a lot of searching. variance_graphic.PNGImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage variance_graphic.PNG (34 KB)
sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
August 10, 2019 - 8:19 am
sp_Permalink sp_Print

Hi Alison,

You can use this technique to reference the next row in Power Query. You'll want to bring the ReportData date column in again so you can compare the columns to make sure they're the same period before performing the variance calculation.

Mynda

Avatar
Allison Parker
Member
Members

Power Query

Power Pivot

Power BI
Level 0
Forum Posts: 10
Member Since:
January 29, 2019
sp_UserOfflineSmall Offline
3
August 17, 2019 - 1:05 am
sp_Permalink sp_Print

I'm sorry, I'm unable to work through the above. 

I ended up adding my variables within the table. So I then import to Power BI and am having another issue. 

When trying to have visuals with "#Members" by date, Power BI wanted to sum. I checked "Don't summarize". Now when I add the "Members" to the values pane it is counted. I'm pulling my hair out. 

I have successfully done this before, I don't understand what I am doing wrong. I will upload the files for you. The main table from excel I use is "PremiumMember"

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
August 17, 2019 - 8:53 pm
sp_Permalink sp_Print

Hi Allison,

Sorry, I should have said that you needed to follow Option 2: Duplicate data and merge. See file attached - PremMember sheet from column M onward. Note: I had to copy your data because I didn't have access to the source file referenced in the query. 

In regards to your Power BI issue; if you want to see Members by Date then you need to put the Date field in the Axis, not in the values area. The Values area only counts/sums/max/min etc.

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
Allison Parker
Member
Members

Power Query

Power Pivot

Power BI
Level 0
Forum Posts: 10
Member Since:
January 29, 2019
sp_UserOfflineSmall Offline
5
August 21, 2019 - 12:24 am
sp_Permalink sp_Print

The merge example, that works! Thank you so much. 

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: andria young, RAMEZ ATTAR
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 205
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Bruce Tang Nian
Scot C
Othman AL MUTAIRI
Misael Gutierrez Sr.
Attif Ihsan
Kieran Fee
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Bhuwan Devkota
Forum Stats:
Groups: 3
Forums: 24
Topics: 6222
Posts: 27293

 

Member Stats:
Guest Posters: 49
Members: 31918
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.