Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a table in Power Query which has a text field with dates in the format "MMM-YYYY". The issue I'm having is that when I create a pivot table, it sorts this field in Alphabetical order with "Apr-2023" on top. I need a way to sort it correctly with "Jan-2023" on top.
Hi,
you'll probably need to create a sort order column and then use sort by column on the column tools ribbon on you current field. The easiest way to do it would be to add a new date field, spliting out the month and year and adding the day 01 to the begining.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
or use Date.FromText([Date Field]) in custom column in power query to create the column
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
The same issue occured for me;
I think if you convert to date as DOLEARY85 says, then sort then pivot iot should work. Mine was to summarise hours for week ending.
Advanced editor steps here;
#"Sorted Rows2" = Table.Sort(#"Replaced Value",{{"Week Ending Sunday", Order.Ascending}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Sorted Rows2", {{"Week Ending Sunday", type text}}, "en-AU"), List.Distinct(Table.TransformColumnTypes(#"Sorted Rows2", {{"Week Ending Sunday", type text}}, "en-AU")[#"Week Ending Sunday"]), "Week Ending Sunday", "Hours", List.Sum)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.