Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I have 3 columns (ID, Status and Last_Updated_Date). ID can repeat and the status can change from Low->Moderate->High->Critical. I would like to capture Max_Date for each ID based on max(Last_Updated_Date) and Latest_Status is Status from max(Last_Updated_Date). Here is an example from excel file. Can someone help achive this in PBI please?
| ID | Status | Last_Updated_Date | Max_Date | Latest_Status |
| 100 | High | 2/14/2023 | 2/14/2023 | High |
| 100 | High | 2/13/2023 | 2/14/2023 | High |
| 100 | Low | 2/12/2023 | 2/14/2023 | High |
| 200 | Critical | 2/12/2023 | 2/12/2023 | Critical |
| 300 | Moderate | 2/13/2023 | 2/13/2023 | Moderate |
| 300 | Low | 2/12/2023 | 2/13/2023 | Moderate |
Solved! Go to Solution.
Max_Date =
CALCULATE (
MAX ( 'Table'[Last_Updated_Date] ),
ALLEXCEPT ( 'Table', 'Table'[ID] )
)
-----
Latest_Status =
CALCULATE (
MAX ( [Status] ),
ALL ( 'Table' ),
'Table'[ID] = EARLIER ( 'Table'[ID] )
&& 'Table'[Last_Updated_Date] = 'Table'[Max_Date]
)
I have explained in this tutorial please do check this out.
Get another column value based on the Max Date or Max Value in PowerBI
I have explained in this tutorial please do check this out.
Get another column value based on the Max Date or Max Value in PowerBI
Max_Date =
CALCULATE (
MAX ( 'Table'[Last_Updated_Date] ),
ALLEXCEPT ( 'Table', 'Table'[ID] )
)
-----
Latest_Status =
CALCULATE (
MAX ( [Status] ),
ALL ( 'Table' ),
'Table'[ID] = EARLIER ( 'Table'[ID] )
&& 'Table'[Last_Updated_Date] = 'Table'[Max_Date]
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |