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
Marcos_Tarnoski
New Member

Get max date in slicer for each row table with dates within selected range

Hi,

 

I have a date slicer to set a range of dates (min and max date). I also have a table with dates within that filtered range. I need to get for each row in the table the max date selected in the slicer but I can't.

I think the measure is affected by the filter context set by the date in each row. So It considers as max date for each row, the date of that row because it's the only date it sees. I need to get out of that filter context set by the rows date, and get the date in the filter but I don't know how.

 

 

 

min_date = LASTDATE(Dim_Fecha[Date])

 

 

 

 Expected output: 07/04/2023 for each row.

Captura de pantalla 2023-06-02 103942.png

 

 

1 ACCEPTED SOLUTION
NaveenGandhi
Super User
Super User

Hello @Marcos_Tarnoski 

Try below DAX.

Max_date = CALCULATE(max('Table'[Date]),ALLSELECTED('Table'))

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate your kudos!!

View solution in original post

1 REPLY 1
NaveenGandhi
Super User
Super User

Hello @Marcos_Tarnoski 

Try below DAX.

Max_date = CALCULATE(max('Table'[Date]),ALLSELECTED('Table'))

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate your kudos!!

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.