cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Charline_74
Helper II
Helper II

How to display the latest status of each WorkItemID

My data : 

Charline_74_1-1685345468797.png

I would like to display the latest status for each WorkItemID.

But I don't really understand how to do it,
I've tried filtering with the date, but if the most recent date is 28/02/2023, the WorkItemID is not displayed.

 

1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @Charline_74 ,

Please try below steps:

1. create a measure with below dax formula

Latest Status =
VAR _id =
    SELECTEDVALUE ( 'Table'[WorkItemId] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), [WorkItemId] = _id )
VAR max_date =
    MAXX ( tmp, [Date.1] )
VAR _val =
    CALCULATE (
        MAX ( 'Table'[Dernier State US] ),
        FILTER ( tmp, [Date.1] = max_date )
    )
RETURN
    _val

 

2. add a table visual with field and measure

vbinbinyumsft_0-1685513921191.png

Please refer the attached .pbix file

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

Hi @Charline_74 ,

Please try below steps:

1. create a measure with below dax formula

Latest Status =
VAR _id =
    SELECTEDVALUE ( 'Table'[WorkItemId] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), [WorkItemId] = _id )
VAR max_date =
    MAXX ( tmp, [Date.1] )
VAR _val =
    CALCULATE (
        MAX ( 'Table'[Dernier State US] ),
        FILTER ( tmp, [Date.1] = max_date )
    )
RETURN
    _val

 

2. add a table visual with field and measure

vbinbinyumsft_0-1685513921191.png

Please refer the attached .pbix file

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Idrissshatila
Community Champion
Community Champion

Hello @Charline_74 ,

 

Try to make a new measure that displays Max date and put it alogside the workItemId and it should display the max date for each ID.

 

MaxDate = MAX(<column>)

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

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!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors