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
summer18
Helper III
Helper III

Get sum of max date/period

Hi,

 

I would like to ask for your help on how to get the sum of max period displayed

 

In the screenshot below, the totals are all in sum by column but I want to display in TOTAL in first 3 columns the sum of max period:

scenario screenshot.png

 

I don't know how to post my pbix here on this message, can't see the icon to upload pbix.

1 ACCEPTED SOLUTION

Hi,

I have solved for Adjustment.  Please solve for Cost and Expenses yourself.  You may dowload the PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
Greg_Deckler
Super User
Super User

@summer18 - If I understand correctly, it sounds like Lookup Min/Max (without the lookup) https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434

or  a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.


@ 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...
harshnathani
Community Champion
Community Champion

Hi @summer18 ,

 

Upoad your sample pbix using One Drive or Google Drive.

 

Regards,

Harsh Nathani

Hi,

I have solved for Adjustment.  Please solve for Cost and Expenses yourself.  You may dowload the PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks @Ashish_Mathur it works

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@summer18 , Try same for all measures adjustments, sales, cost and expense

lastnonblankvalue(Table[Date],Sum(Table[adjustments]))

 

and take the max of date/period in the visual, use invoice no as row/axis/not summarized

Thanks @amitchandak for always helping me. Unfortunately, the user wants to display all the periods but in TOTAL row he wants to see the value of max date of the invoice. The invoice number is single select but the fiscal period is multiple selection.

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.