Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am working on a line chart and the x-axis is supposed to have rolling quarters but power bi is sorting the quarters for me and they are out of order. Here is the picture of my data and what I am getting:
Solved! Go to Solution.
Hi @bcastillo
I can reproduce your problem.
My "Quarterly data" column is of text type, when I add it to the axis of the line chart,it will sort by another column of number type by default. picture below is an example.
One workaround is:
create a Index column in Query editor
Then in Report View, select "Quarterly data" column, then select on the Modeling->Sort by column, click on the "Index" column.
Next on the Line chart, select the three dots on the upper-right of it, select "Sort by"->"Quarterly data".
Best Regards
Maggie
Hi @bcastillo
I can reproduce your problem.
My "Quarterly data" column is of text type, when I add it to the axis of the line chart,it will sort by another column of number type by default. picture below is an example.
One workaround is:
create a Index column in Query editor
Then in Report View, select "Quarterly data" column, then select on the Modeling->Sort by column, click on the "Index" column.
Next on the Line chart, select the three dots on the upper-right of it, select "Sort by"->"Quarterly data".
Best Regards
Maggie
Need to add a column wiht a numeric year quarter. If you dont' have it in your date table you can add by adding a calculated column
Year Quarter Number = YEAR([date]&FORMAT([date],"Q")
Then form the Table View Select the Text column for the Q-YR and choose sort by and select Sort By.
If you don't see a sort option at all there may be a sort otpion you need to change the option in the AXIS properties for type and choose categorical instead of continuous.
Also, I do not have the option to select continuos, if I click it it goes right back to categorical
I am getting an error message when I use that code
When I try to change the format as a Date it gives me this error
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |