Forum Discussion
Sort the visualization by month
- 5 years ago
This is because your MonthNum has different values for Same Month
e.g. Jan has 169,183,197 etc causing issues while sorting
to make this work your each text value must have the same Numeric value for sorting.
Try create a calculated column to give you values
- Jan =1
- Feb =2
and so on.
Then apply sort by option and it will work for you.
Note: This calculated column should be done in Power Query or in Data Source.
This is because your MonthNum has different values for Same Month
e.g. Jan has 169,183,197 etc causing issues while sorting
to make this work your each text value must have the same Numeric value for sorting.
Try create a calculated column to give you values
- Jan =1
- Feb =2
and so on.
Then apply sort by option and it will work for you.
Note: This calculated column should be done in Power Query or in Data Source.
- tuncay5 years ago
Helper III
I tried this:
Spoilerif [Month] = "ACT YTD PY" then 1
else if [Month] = "Jan" then 2
else if [Month] = "Feb" then 3
else if [Month] = "Mar" then 4
else if [Month] = "Apr" then 5
else if [Month] = "May" then 6
else if [Month] = "Jun" then 7
else if [Month] = "Jul" then 8
else if [Month] = "Aug" then 9
else if [Month] = "Sep" then 10
else if [Month] = "Oct" then 11
else if [Month] = "Nov" then 12
else if [Month] = "Dec" then 13
else if [Month] = "YTD" then 14else 15
But it only shows me 1, 15 and 14. It doesn't work so well. Why?
- FarhanAhmed5 years ago
Community Champion
This should work.
Make sure that you don't have any trailing or leading spaces in your data.
Try Trim before applying this step.
- tuncay5 years ago
Helper III
Trimmed month column. Still showing the numbers: 15, 14, 1 only 😞