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
giordafrancis
Frequent Visitor

DAX Group by on column but only display latest date budget

Consider the below table

 

iddatebudget
10101/06/2020    50
10101/07/2020    100
10301/06/2020    50
10301/07/2020    50
10301/08/2020    20

 

I'm looking to create a measures

  1. that groups by on the id col
  2. but only presents the latest entry based on date

Desired output is a table as below

 last datebudget
10101/07/2020    100
10301/08/2020    20

 

 

Thank you in advance

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @giordafrancis ,

 

 

You can use this for Last Date

 

Last Date = CALCULATE(LASTNONBLANK('Table'[date],1) ,FILTER(ALL('Table'[id]), 'Table'[id] = MAX('Table'[id])))

 

and the above mentioned measure for Last Budget.

Last Budget = 
lastnonblankvalue('Table'[date],sum('Table'[budget]))

 

 Regards,

Harsh Nathani

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @giordafrancis ,

 

 

You can use this for Last Date

 

Last Date = CALCULATE(LASTNONBLANK('Table'[date],1) ,FILTER(ALL('Table'[id]), 'Table'[id] = MAX('Table'[id])))

 

and the above mentioned measure for Last Budget.

Last Budget = 
lastnonblankvalue('Table'[date],sum('Table'[budget]))

 

 Regards,

Harsh Nathani

amitchandak
Super User
Super User

@giordafrancis , use this for budget

lastnonblankvalue(Table[date],max(Table[budget]))

or

lastnonblankvalue(Table[date],sum(Table[budget]))

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

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.