The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 visualization where the columns would be the Quarter and the rows would be the attributes. Each matrix vis would be filtered by the measurement column. So one vis would show values for HEIGHT and another only for WEIGHT.
I want to arrange the rows in the matrix visual such that the Mean is shown first, then Median, Min, Max and so on. However it is displaying by alphabetical order.
I tried creating an Order column using conditional column such that I assign 1 if the attribute column value = "Mean" and so on, but I get the error saying that " There cant be more than value in 'Order' for the same value in 'Attribute'
I checked and each attribure value has a distinct number, albeit multiple occurences of the same number across the various measurements.
Is there any way I can achieve what I want?
@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.
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?