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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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