Forum Discussion
powerbifuddaa
Helper II
2 years agorankx dax
Hi all, I would like to see this (rank_desired): I can only use DAX. I hope somebody can help me. Thank you! Regards, Elmer
ThxAlot
Super User
2 years agoNothing to do with RANKX(). Simplest table grouping in PQ does the trick.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ddBBCsAgDATAv3huINmo1WPfUfz/N2ppU1PE25IdVvA8wxG2ICQEltijCpWeIfeZmZFD20xVa7oSLNk9BrzM8qRgDcrIk9Jviyk7lWJyancvlqWqX/PM6owwmvRHeaA8Gl1PCUVrQMILpa6yX63VuXYB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Customer = _t, StartDate = _t, EndDate = _t, Department = _t]),
Grouped = Table.AddIndexColumn(Table.Group(Source, "Department", {"Grp", each _}, GroupKind.Local),"SN",1,1),
#"Expanded Grp" = Table.ExpandTableColumn(Grouped, "Grp", {"Customer", "StartDate", "EndDate"}, {"Customer", "StartDate", "EndDate"})
in
#"Expanded Grp"
AilleryO
Memorable Member
2 years agoThanks you for your proposal but powerbifuddaa specify that he can use only DAX
so a Power Query solution might not be valid for him.