Forum Discussion
Sorting Matrix rows - this should be easy
- 3 years ago
Yes if it's from the same dimension (table). If you want it by Year and Month then you should replace those two columns with a Month-Year column and have that column sorted by your Date field. If you don't already have a column for that, it could easily be created by adding a new calculated column:
Mnth-Year = FORMAT([Date], "MMM YYYY")
Hi davidlittle ,
Select the matrix visual, click the three-dots at the top right, and click Sort By and click your Year column:
If that doesn't work, try changing your year from a text to a number.
hnguy71 Thankyou for quick reply! this allows me to sort it numerically by year which works and is brilliant thankyou but I overlooked this doesnt sort by the other columns ? By which I mean the data is grouped by year and month, so ideally i want it sorted by year, then month - can I add "tierd" sorting ?
- hnguy713 years agoSuper User
Yes if it's from the same dimension (table). If you want it by Year and Month then you should replace those two columns with a Month-Year column and have that column sorted by your Date field. If you don't already have a column for that, it could easily be created by adding a new calculated column:
Mnth-Year = FORMAT([Date], "MMM YYYY")- davidlittle3 years agoFrequent Visitor
Aha, I added the column you mention but couldnt set "sort by" date on it as the date column had multiple values per month year grouping (as it would do) BUT building in your solution i added a calculated sort coulmn and then sorted the visual by that ! so thank you very much for your solution as it allowed me to fix it it!
Mnth-Year-sort = VALUE(Dates[Calendar Year] & "00") + Dates[Calendar Month]