Forum Discussion
PatDools
Aug 18, 2022Brass Contributor
Sort by chronological date for 'mm/yyyy' format?
Hello,
I have a calculated field that extracts month and year from a date field using the TEXT function:
TEXT(A2, "mm/yyyy") Example: 01/2022
The problem I've having is that my dataset spans a number of years, and so it sorts in my Pivot Table by month and not by month/year as shown below:
| 01/2021 |
| 01/2022 |
| 02/2021 |
| 02/2022 |
| 03/2021 |
| 03/2022 |
| 04/2021 |
| 04/2022 |
| 05/2021 |
I need it to sort by chronological date like this:
| 01/2021 |
| 02/2021 |
| 03/2021 |
| 04/2021 |
How do I get it to sort by month and year in chronological order?
Thank you!