cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Delion
Helper IV
Helper IV

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
Super User
Super User

Hi @Delion ,

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
Super User
Super User

Hi @Delion ,

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!

@Migasuke 

 

It's solved, I modify it a bit

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

@Migasuke 

 

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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors