Forum Discussion
sort by month and year
- 2 years ago
Hi kasife
You can't sort months without years in chronological order.
There is no way for the engine to know when January is from last year and when from the next.
You should use some combination of year and month to make it work.For example :
Which can be sorted by column with the logic:
Date.ToText([Date],"yyyyMM") from PQPbix with my example and calendar table with the needed columns is attached.
More information about sorting by month and year is here :
https://www.youtube.com/watch?v=kHK6bnaD8ig
Hi kasife
You can't sort months without years in chronological order.
There is no way for the engine to know when January is from last year and when from the next.
You should use some combination of year and month to make it work.
For example :
Which can be sorted by column with the logic:
Date.ToText([Date],"yyyyMM") from PQ
Pbix with my example and calendar table with the needed columns is attached.
More information about sorting by month and year is here :
https://www.youtube.com/watch?v=kHK6bnaD8ig