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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ 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!:
DAX For Humans

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors