Forum Discussion
grkanth81
8 years agoHelper II
Sort column Headers in a Matrix
Hi Guys, Can we control the sorting for the column headers in a matrix ?The row and the column sorting should be done based on other columns (here i ahve created 2 new columns in the data model Empl...
- 8 years ago
Anonymous
8 years agoNot applicable
Hi grkanth81,
AFAIK, current power bi not support custom order of columns, it only support default sort order. I'd like to suggest you submit an idea for this requirement.
Maybe you can try to add calculate column to modify column with custom prefix string to achieve custom sort order.
Custom Category =
VAR _prefix =
SWITCH (
[Category],
"Not_Applicable", "0_",
"0-30 Days", "1_",
"31-60 Days", "2_",
"61-90 Days", "3_",
"91-120 Days", "4_",
"120+ Days", "5_",
"z_"
)
RETURN
_prefix & [Category]
Regards,
Xiaoxin Sheng
grkanth81
8 years agoHelper II
Thanks Xiaoxin Sheng for you reply.
There seems to be other related ideas already requested and i have now voted it
Thanks for your SWITCH suggestion, But when i did in that way the row headers are displaying as below and i don't want to see that starting text 0_, 1_, 2_ etc....and I guess we can't get rid of them while displaying. I am not sure.
Thanks,
Ravi