Forum Discussion
thentangler
2 years agoFrequent Visitor
Assigning order to Attribute column
I have 4 columns: Measurement, Quarter, Attribute and Value. The Value column is not shown in the screenshot. This is an unpivoted table from a flat table so that I can utilize a matrix visualizati...
Greg_Deckler
2 years agoCommunity Champion
thentangler You can create a conditional column in Power Query (nested if then else statements) or you could create a DAX calculated column using a SWITCH statement to assign a number. I think if you want to use the column as a Sort By column that you want to use PQ to avoid potential circular references.
thentangler
2 years agoFrequent Visitor
How do I create nested If statements using the GUI in Power Query?
Would I assign the number 1 for the Attribute 'Mean' when Measurement = HEIGHT and Quarter =1. And would I assign 2 if Quarter = 2? That would create a large sorting order? Cant Power BI use the order grouped by Measurement and Quarter?