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.
I have my data in excel with month name in one of the columns. When I create a chart and sort by month, it sorts december before January since it bring the data as text. How can I fix this issue? I tried to convert the data into date type in Power BI but it gives me an error that that data can not be changed.
Solved! Go to Solution.
Hi @anilbatra,
I would suggest going into the Query Editor and creating a Conditional Column.
For your Conditional Column you would create it where for each Month you would give it a number.
As shown below:
And then once this loads into Excel or Power BI Desktop, click on the Modelling tab, and where it says Sort by Column, click on the Drop Down and select the Month Number column you created above.
After which your months should then sort correctly.
You have to select the field on the fields list, not in the visuals pane.
Hi @anilbatra,
I would suggest going into the Query Editor and creating a Conditional Column.
For your Conditional Column you would create it where for each Month you would give it a number.
As shown below:
And then once this loads into Excel or Power BI Desktop, click on the Modelling tab, and where it says Sort by Column, click on the Drop Down and select the Month Number column you created above.
After which your months should then sort correctly.
I created the conditional column as you instructed. I went to the modeling tab to do my sort and the "sort by column" button is greyed out. Any suggestions?
Hi @naperryman,
What you will need to do is to select the Month column so that it is shown as selected with the yellow bar around it as shown below.
Once you have selected the above, the Sort By Column should then be able to be changed.
The chart, a bar graph, does not let me sort it by this conditional column. The only options available are the month name (used in x-axis) and various values I used in chart. The top menu option "Sort by Column" is grayed out.
You have to select the field on the fields list, not in the visuals pane.
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |