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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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)
)