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

Measure to Show latest Status that updates based on Date Slicer

Hello,

 

I was wondering if it is possible to have a measure in a table dynamically update based on the date slicer?

 

What I would like to achieve is for every ID find the latest status and apply that to every row with that ID.

 

And then have that update everytime a date slicer is used.  

 

Data

IDDateStatus
130/01/2019A
14/04/2019A
121/02/2020B
123/02/2022B
23/03/2020A
24/07/2020B
25/08/2021C
29/03/2022A
35/12/2019C
34/04/2020C
36/03/2021B
323/07/2021B
421/03/2019A
422/04/2020B
414/07/2021C
42/02/2022A
42/02/2022A

 

Expected Outcome

IDDateStatusLatest Status
130/01/2019AB
14/04/2019AB
121/02/2020BB
123/02/2022BB
23/03/2020AA
24/07/2020BA
25/08/2021CA
29/03/2022AA
35/12/2019CB
34/04/2020CB
36/03/2021BB
323/07/2021BB
421/03/2019AA
422/04/2020BA
414/07/2021CA
42/02/2022AA
42/02/2022AA

 

Expected Outcome when slicer is set to max date of 31/12/2021

IDDateStatusLatest Status
130/01/2019AB
14/04/2019AB
121/02/2020BB
23/03/2020AC
24/07/2020BC
25/08/2021CC
35/12/2019CB
34/04/2020CB
36/03/2021BB
323/07/2021BB
421/03/2019AC
422/04/2020BC
414/07/2021CC
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jmowen , Try a measure like

 

calculate(LASTNONBLANKVALUE(Table[Date], max(Table[Status])), filter(allselected(Table), Table[ID] = max(Table[ID])))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@jmowen , Try a measure like

 

calculate(LASTNONBLANKVALUE(Table[Date], max(Table[Status])), filter(allselected(Table), Table[ID] = max(Table[ID])))

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.