Forum Discussion
Sorting months spanning two years
Hi,
you'll need to sort your column by something that runs in the correct order.
Select your month-year column and use 'sort by column' on the 'column tools' tool bar then select the field to sort by. If you don;t have anything you could create something simple like a number that follows the month and year in your calendat table. e.g
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Thanks Doleary58 for replying.
I have a column as Month and Year in format "YYMMMM" so Sep 2022 is written as 092022.
Now in line chart i have put this field in X-axis. Also, I have sorted the data by this column as you explained.
But still it is not sorted chronologically whether you do ASC or DESC.
Isn't it?
- DOLEARY852 years agoResident Rockstar
Can you check that your month year serial column is numeric?
- gauravkumar162 years agoFrequent Visitor
Thanks for pointing that out.
Now I have made it numeric but still it is not chronological.
- DOLEARY852 years agoResident Rockstar
You may need to make the numeric column to sort by something different, try creating a calculated column that ranks the date in order:
1. RankColumn = RANKX(ALL(Table), Table[Date Column], , ASC, Dense)2. Select the field you want to be ordered (yearmonthserial)3. Select column tools, sort by column, then the rank column you just made4. if the chart doesn't update automatically, remove the yearmonthserial field and readd it.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍