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 a line chart visual that displaying monthly temperature.
The temperature values are stored in a table with a column [M] which is the integer month number, from 1 to 12.
When I plot them I got something like this
As you see, I have the numbers in X-Axis, however, I want to display Month Names instead, e.g. {Jan, Feb, ... , Dec}
I have created a table with two columns, one for months numbers, and the other for names, as suggested by this post, and I followed what they suggested by sorting by column, (I made a relationship between [M] and the month number) but unfortunately it fails, as this what I got!
As you see, the chart sorts the months on unknown criteria, neither by month numbers, nor by month names alphabetically, but they are almost in descending order by value of temperature!
Please help my drawing this graph sorting x-axis labels by month numbers instead of this.
Thanks in advance.
Solved! Go to Solution.
Hi @DrNesr,
The default sort order for text based fields is alphabetic. So normally you need a numeric column alongside this that you can use the "Sort by column" feature.
In your case it seems something different. It looks like it's almost sorting highest to lowest.
In the top right hand corner of your visual there is the ... elipsis. In there you can set a sort order. Can you please check to see what that is currently set to?
Hi @DrNesr,
The default sort order for text based fields is alphabetic. So normally you need a numeric column alongside this that you can use the "Sort by column" feature.
In your case it seems something different. It looks like it's almost sorting highest to lowest.
In the top right hand corner of your visual there is the ... elipsis. In there you can set a sort order. Can you please check to see what that is currently set to?
You are awesome @Phil_Seamark,
Thank you very much for this solution.
I checked the dots you mentioned, I found the following
Then I clicked the first item (Sort by M_Name
I got the following
But it was sorted from December to Jauary, I clicked again on the Z-A icon next to the ffirst item as shown
Finally it is solved.
Thanks a lot.
Cool, looks fantastic!
Hi Phil,
If I have an dynamic X axis say If i select Daily its should chnage to Day level, Monthly then Month Level. So far it works fine if I am on daily but moment I click on weekly the month names are sorted alphabatically. So I cerated another small table to sort with Month Names and their Ids as 1,2,3, for Jan, Feb, Mar and so on and put sorting on Month ID but still not working.
My X Axis formula is like
SortedXAxis = if(Period[SelectedPeriod]="Monthly",InventoryReporting[MonthName],if(Period[SelectedPeriod]="Weekly",format(InventoryReporting[WEEK_END_DATE],"MM/DD/YYYY"),format(InventoryReporting[Snapshot Date],"MM/DD/YYYY")))
where when I click on Monthly in filter below it gives me data but MOnth Name is sorted alphabatically as below whiel I want to sort it by its sequence. This is bit different than usual
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |