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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Get value from each group based on latest date

Delion_0-1647159868439.png

 

Hi How to get  Value for each Type based on max date from column End_Date

This should be 2 measure, because will use it in card visual separetely  

Measure1_Open : value 3 , because max date from End_Date = 31 Mar 2022

Measure2_Closed : value 11, because max date from End_Date = 28 Feb 2022

 

Thank

1 ACCEPTED SOLUTION
Migasuke
Memorable Member
Memorable Member

Hi @Anonymous ,

I think standard CALCULATE should work. Something like:
Measure1_Open = CALCULATE(SUM('Table'[Value]),LATESTDATE('Table'[End_Date]),'Table'[Type]="Open")

The same logic applies for the second measure.

I wrote this on my  phone so if its not working, let me know and I will re-check from my pc.



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

View solution in original post

3 REPLIES 3
Migasuke
Memorable Member
Memorable Member

Hi @Anonymous ,

I think standard CALCULATE should work. Something like:
Measure1_Open = CALCULATE(SUM('Table'[Value]),LATESTDATE('Table'[End_Date]),'Table'[Type]="Open")

The same logic applies for the second measure.

I wrote this on my  phone so if its not working, let me know and I will re-check from my pc.



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

Anonymous
Not applicable

@Migasuke 

 

It's solved, I modify it a bit

Measure1_Open = CALCULATE(SUM('Table'[Value]),LASTDATE('Table'[End_Date]),'Table'[Type]="Open")

Anonymous
Not applicable

@Migasuke 

 

hmm using LATESTDATE is not working, why use LATESTDATE not MAX?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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