Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
i have the above column in my dataset table and August to December represent a different year from the January to December and onwards. How do i creat a custom column that sorts the months according to the different years?
Solved! Go to Solution.
Hi, @abelbb
You can try the following methods. In the Power Query, add index column:
Column:
Count = CALCULATE(COUNT('Table'[Month]),FILTER('Table',[Index]<=EARLIER('Table'[Index])&&[Month]=EARLIER('Table'[Month])))Date = DATEVALUE(2023-[Count]&"/"&'Table'[Month]&"/"&"1")Sort = YEAR([Date])*100+MONTH([Date])
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @abelbb
You can try the following methods. In the Power Query, add index column:
Column:
Count = CALCULATE(COUNT('Table'[Month]),FILTER('Table',[Index]<=EARLIER('Table'[Index])&&[Month]=EARLIER('Table'[Month])))Date = DATEVALUE(2023-[Count]&"/"&'Table'[Month]&"/"&"1")Sort = YEAR([Date])*100+MONTH([Date])
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 29 | |
| 28 | |
| 27 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 56 | |
| 48 | |
| 39 | |
| 28 | |
| 21 |