Forum Discussion
Anonymous
5 years agoNot applicable
TRICKY - Sort column with Report Headings
Hi Experts
I experts i not sure how to do this i want to sort My column New_Reporting_Headers......have a look at table Logistics...
https://www.dropbox.com/s/jtjpt0czo0mgnnj/PLP_Test.pbix?dl=0
Anonymous , In the same manner, create sort order column and mark that a sort column
New_Reporting_Headers sort = Switch( True() , Logistics_[GrpId] = "a3", 1, Logistics_[GrpId] IN { "a7", "a8" }, 2, Logistics_[GrpId] IN { "b2", "b3", "b4" }, 4, Logistics_[GrpId] IN { "i5", "i6" }, 3, Logistics_[GrpId] IN { "i7", "j1" }, 6, Logistics_[GrpId] IN { "i1", "i2", "i3", "i4" }, 5, Logistics_[GrpId] IN { "i8", "i9", "j2", "j3" }, 7,8 )https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
4 Replies
- amitchandak
Super User
Anonymous , In the same manner, create sort order column and mark that a sort column
New_Reporting_Headers sort = Switch( True() , Logistics_[GrpId] = "a3", 1, Logistics_[GrpId] IN { "a7", "a8" }, 2, Logistics_[GrpId] IN { "b2", "b3", "b4" }, 4, Logistics_[GrpId] IN { "i5", "i6" }, 3, Logistics_[GrpId] IN { "i7", "j1" }, 6, Logistics_[GrpId] IN { "i1", "i2", "i3", "i4" }, 5, Logistics_[GrpId] IN { "i8", "i9", "j2", "j3" }, 7,8 )https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
- AnonymousNot applicable
Hmmmm , add a new column and use that as a sort or amend the if formula to a switch???
- amitchandak
Super User
Anonymous , I suggested a new sort column. I have used Switch.
You can also use the switch in your original column