Forum Discussion
jerryr125
8 months agoHelper IV
Filtering a table on the Max date by department
Hi - I am trying to do the following (I posted something earlier this month and I think the example was incorrect). I would like to pull the max date based upon a specific department. Input: D...
- 8 months ago
Thank you everyone for examples and assistance - appreciate it.
I ended up doing the following:
- Sort by Department (Ascending) then by date (Decending - putting the most recent date first)
- Adding ranking logic by Department
- The result is the most recent date results in a ranking of 1 for each departmnt
- Filter on the 1 Ranking
As the data dynamically updates, I will always get the most recent date.
Thanks - Jerry
ralf_anton
8 months agoResolver I
Hi Jerry,
let
Quelle = Excel.CurrentWorkbook(){[Name="Tabelle3"]}[Content],
#"Geänderter Typ" = Table.TransformColumnTypes(Quelle,{{"KPIDATE", type date}}),
#"Gruppierte Zeilen" = Table.Group(#"Geänderter Typ", {"ABTEILUNG"}, {{"LastDate", each List.Max([KPIDATE]), type nullable date}})
in
#"Gruppierte Zeilen"