Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I have a table with three columns - Date, Emp, Status.
My requirement is to create a dax formula to show the latest status.
I have a sample data attached in this file
Required output is :
| Emp | Status |
| E1 | Active |
| E2 | Active |
| E3 | Terminated |
Based on the latest date, need to look for the latest status. Can some one pls suggest with a solution for this?
Thank you.
Solved! Go to Solution.
Download PBIX file with the example below
Try this, works for me
Latest Status =
VAR _latest_date = CALCULATE(MAX('Sheet1'[Date]), FILTER(ALL('Sheet1'), 'Sheet1'[Emp] = SELECTEDVALUE(Sheet1[Emp])))
RETURN CALCULATE(MAX('Sheet1'[Status]), FILTER('Sheet1', 'Sheet1'[Emp] = SELECTEDVALUE(Sheet1[Emp]) && 'Sheet1'[Date] = _latest_date))
Regards
Phil
Proud to be a Super User!
Hi @POSPOS ,
Your solution is great, collinq and PhilipTreacy . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.
you can use the following DAX formula in Power BI to get the latest status for each employee.
LatestStatus =
VAR LatestDate =
CALCULATE(
MAX('Sheet1'[Date]),
ALLEXCEPT('Sheet1', 'Sheet1'[Emp])
)
RETURN
CALCULATE(
VALUES('Sheet1'[Status]),
'Sheet1'[Date] = LatestDate,
ALLEXCEPT('Sheet1', 'Sheet1'[Emp])
)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @POSPOS ,
There are many ways to do this I am sure but I did it by creating a new table in DAX with this command:
Proud to be a Datanaut!
Private message me for consulting or training needs.
Download PBIX file with the example below
Try this, works for me
Latest Status =
VAR _latest_date = CALCULATE(MAX('Sheet1'[Date]), FILTER(ALL('Sheet1'), 'Sheet1'[Emp] = SELECTEDVALUE(Sheet1[Emp])))
RETURN CALCULATE(MAX('Sheet1'[Status]), FILTER('Sheet1', 'Sheet1'[Emp] = SELECTEDVALUE(Sheet1[Emp]) && 'Sheet1'[Date] = _latest_date))
Regards
Phil
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |