Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

When you drill up do not sum values for different dates but show the sum for the last date instead

I have a table - see below

Date Value
2022-01-31 53
2022-01-31 40
2022-01-31 57
2022-02-28 56
2022-02-28 23
2022-03-31 68
2022-03-31 70
2022-04-30 27
2022-04-30 79
2022-05-31 26
2022-05-31 43
2022-06-30 22
2022-06-30 34
2022-07-31 26
2022-07-31 37
2022-08-31 58
2022-08-31 97
2022-09-30 81
2022-09-30 77
2022-10-31 99
2022-10-31 29
2022-11-30 95
2022-11-30 87
2022-12-31 48
2022-12-31 32

and I have a standard visual - see below

Garek_1-1672235759109.png

The visual presents a sum of values for end of December, end of November and so on.

The problem is when I click drill up button PowerBI sums up values for three months for each quarter and I want PowerBI not to sum values for three months I want PowerBI to present value for the last month of each quarter. E.g. I want PowerBI to present value of 80 for Qtr 4 instead of value of 390. I can't figure it out.

Garek_2-1672235896453.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Greg, you're genius:) It works like a charm.

I created a meassure as you suggested in your posts and it solved the problem!

Measure = IF(HASONEFILTER('Table'[Date]);SUM('Table'[Value]);SUMX(FILTER('Table';'Table'[Date]=MAX('Table'[Date]));'Table'[Value]))
Thank you for such quick and exact answer:)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hello I have the exact opposite problem, when I drill up (to Quarters) Power BI automatically the value of the last sub category (March in Q1 June in Q2 etc...) when I would like it to display the sum, how should I do?

Anonymous
Not applicable

Greg, you're genius:) It works like a charm.

I created a meassure as you suggested in your posts and it solved the problem!

Measure = IF(HASONEFILTER('Table'[Date]);SUM('Table'[Value]);SUMX(FILTER('Table';'Table'[Date]=MAX('Table'[Date]));'Table'[Value]))
Thank you for such quick and exact answer:)
Greg_Deckler
Super User
Super User

@Anonymous While not the classic case of this issue, you can fix this by creating a measure similar to how you fix measure totals when they don't total correctly.

First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.