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 everyone
I have showed my need in this image.
Thanks in advance for your help.
Solved! Go to Solution.
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"ID"}, {{"Count", each Table.Max(_,"Date")}}),
#"Expanded Count" = Table.ExpandRecordColumn(#"Grouped Rows", "Count", {"Date", "Status"}, {"Date", "Status"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Count",{{"ID", type text}, {"Date", type date}, {"Status", type text}})
in
#"Changed Type"
Hope this helps.
Hi,
Just in case you want a solution using measures, then refer to my solution in the attached PBI file.
Hope this helps.
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"ID"}, {{"Count", each Table.Max(_,"Date")}}),
#"Expanded Count" = Table.ExpandRecordColumn(#"Grouped Rows", "Count", {"Date", "Status"}, {"Date", "Status"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Count",{{"ID", type text}, {"Date", type date}, {"Status", type text}})
in
#"Changed Type"
Hope this helps.
Hi Ashish
Thanks. Your both solutions work perfect.
You are welcome.
You can create a calculated table (Modeling > New Table):
SumTable =
SUMMARIZECOLUMNS(
'Table'[ID],
"Date", MAX('Table'[Date]),
"Status",
VAR MaxDate = MAX('Table'[Date])
RETURN
CALCULATE(VALUES('Table'[Status]), 'Table'[Date] = MaxDate)
)
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 |