Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I am creating a Matrix in power BI from a 4 million record 80 column from a direct sql query. The matrix column headers are date spans are out of order. The output defaults to this order 0 to 29 , 180+ , 30 to 89 and 90 to 179 . I would like the column headers to be in this order 0 to 29 , 30 to 89 and 90 to 179 , 180+. With thew 180+ as the last column. After much searching I have not found a solution. Can this be accomplished? Thank you in advance.
Solved! Go to Solution.
Hi @jsm2116
You might consider inserting an index column and sort by it.
Here're other threads could be your reference:
https://community.powerbi.com/t5/Desktop/Matrix-Column-Head-Order/m-p/71572
Also, you use a SWITCH expression (instead of nested IFs) in your calculated column. Something like
SortOrder = SWITCH(Table[Column], "0-29",1,"30 to 89",2,"90-179",3,"180+",4)
where Table[Column] is replaced by the column used in your matrix columns.
If not help, kindly share your dummy pbix.
Hi @jsm2116
You might consider inserting an index column and sort by it.
Here're other threads could be your reference:
https://community.powerbi.com/t5/Desktop/Matrix-Column-Head-Order/m-p/71572
Also, you use a SWITCH expression (instead of nested IFs) in your calculated column. Something like
SortOrder = SWITCH(Table[Column], "0-29",1,"30 to 89",2,"90-179",3,"180+",4)
where Table[Column] is replaced by the column used in your matrix columns.
If not help, kindly share your dummy pbix.
@jsm2116 , You need to create a sort and then for bucket column mark it as sort column
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |