I have created a 100% Stacked Column Chart by using two data tables, done sort based on Descending for 0_Visibility_Graph, now i want another sort based "Delivery Priority Code" from Ascending "10, 20, 30 40 & 50", but in below snapshot you can see it is from 50 t 10.
can you please help me on this.
Have you tried the following?
Create a new table by clicking on Enter Data and fill the 2 columns
1.ID (desired sorting order)
2. Delivery Priority code
and then add the relationship between two tables by Delivery Priority Code.
Next, drag and drop the Delivery Priority code from the new table in the legend.
Now click on the visual and click on the Delivery Priority code in the new table in Fields section and then in the column tools click sort by the ID column.
@harirao , Create a sort column in that order and mark that as a sort column.
Delivery Priority Code 1 = [Delivery Priority Code]
Delivery Priority Code Sort = Switch ( Delivery Priority Code,
Sort Delivery Priority Code 1 on Delivery Priority Code Sort and use that
Hello @amitchandak ,
Thanks for your response, am getting "Argument '12' in SWITCH function is required."error while creating new column using switch function.
Can you please help me on this.
The error is that there is another comma after 5
and I would suggest you add a conditional column in edit queries, not use calculated column by dax. calculated column usually will lead to a cyclic error when use sort by column
Thanks for your input, i tried with above option also still i am unable to do sort from ascending to descending.
Can you please suggest any other solution.
if the value should be "P10","P20","P30","P40","P50" not 10,20,30,40,50 in there?
if you still have the problem, please share a simple sample pbix file for us have a test.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.