We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I am trying to sort the column order of a matrix. I created a helper column to use as the sort order. But when I click the field for the columns in the matrix and click sort by the helper column I get an error message
Solved! Go to Solution.
Hi @TomSinAA ,
you could try this code:-
StateSort = SWITCH(
TMSShipmentDetail[State],
"Awaiting", "1",
"Tendered", "2",
"Confirmed", "3",
"Pick Ready", "4",
"Intransit", "5",
"Delivery Ready", "6",
"Received", "7",
"0" // Default value in case none of the above conditions are met
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @TomSinAA ,
Could you please share the code that you have written for sorting?
And please provide some sample data with the expected output it help us to give you a more specific answer
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Samarth_18 ,
I created a new column in my table using this formula:
Hi @TomSinAA ,
you could try this code:-
StateSort = SWITCH(
TMSShipmentDetail[State],
"Awaiting", "1",
"Tendered", "2",
"Confirmed", "3",
"Pick Ready", "4",
"Intransit", "5",
"Delivery Ready", "6",
"Received", "7",
"0" // Default value in case none of the above conditions are met
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
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 |
|---|---|
| 57 | |
| 38 | |
| 32 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |