Forum Discussion
Re: How to sort months axis in graph like in query table?
You will want to use Sort By functionality.
10 Replies
- DaemetiusHelper II
@smoupre wrote:You will want to use Sort By functionality.
I tried it (if this is the one you are referring to). I sorted by Month and it automatically sorts its by Name like in the picture of the X-axis. It's very frustrating. I honestly don't know why it's doing it, when clearly the table has it in the right order I desire.
- MiskonduktHelper III
Have you tried using that section cut off on the right of your image for formatting your values to dates? You currently have it listed as text, perhaps date will help in your issue.
- DaemetiusHelper II
Miskondukt wrote:Have you tried using that section cut off on the right of your image for formatting your values to dates? You currently have it listed as text, perhaps date will help in your issue.
This is what I have. All grayed out except text.
Updated Screenshot
- MiskonduktHelper III
Additionally, is your organic data labeled as pictured (Named months) or is it in a date format
- 1/1/17
- 2/1/17
- 3/1/17 ...
- DaemetiusHelper II
Miskondukt wrote:Additionally, is your organic data labeled as pictured (Named months) or is it in a date format
- 1/1/17
- 2/1/17
- 3/1/17 ...
The data I get it from is from Excel table and no, it's a column with the name of the months. I think it may be the culprit since the cells are formatted as text for that column.
- deldersveldResident Rockstar
You would need to sort by Month number, not Months. If you do not have a separate column for month number, you can create one using DAX's MONTH() function.
- DaemetiusHelper II
deldersveld wrote:You would need to sort by Month number, not Months. If you do not have a separate column for month number, you can create one using DAX's MONTH() function.
I'm quite beginner with DAX functionalities. How would that work exactly? You are saying I require a column with the actual numerical months so that it may be actually sorted correctly, but I can do it with DAX?
Would that sort it from January to December? I would like for it to sort it in the order that it's in the query table. I was able to make the graph in the exact order in Excel with April starting out and then May, June, July, August, September, October, November, December, January, February, March.