Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Experts
My Dates column in a certain table has mulitple dates - i want to sort the data how is was copy and pasted into the table (enter data) in Power Query.
Date Column
20 April 2021
20 April 2021
20 April 2021
20 April 2021
20 April 2021
20 April 2021
20 April 2021
30 June 2019
Solved! Go to Solution.
That's too vague, without understanding what exactly you want to achieve I cannot give a solution.
The index added in Power Query will sort the table in the given order, the fact that a specific columns will also be sorted is just a consequence. This is the way to go if you need the sort for the calculations in M. Also this doesn't impact the table sorting in DAX layer at all.
In the DAX layer the sorting can happen in two levels:
1) in a visual, where e.g. all entries for '20 April 2021' will be grouped to reflect the number of items shown for that date, if that's what you want to sort then you just need custom index per date in the order you expect and use sort by column
2) in the table view, but that doesn't have any implications for the measure/column calculations or visuals, so I doubt this is what you're looking for
I would add an index column after the data was pasted, then you use it for sorting purposes and remove afterwards
Hi Stachu, try thats but i have multiple date values.....
ok, one step back - do you want to sort in Power Query or in the model?
Either which method works...
That's too vague, without understanding what exactly you want to achieve I cannot give a solution.
The index added in Power Query will sort the table in the given order, the fact that a specific columns will also be sorted is just a consequence. This is the way to go if you need the sort for the calculations in M. Also this doesn't impact the table sorting in DAX layer at all.
In the DAX layer the sorting can happen in two levels:
1) in a visual, where e.g. all entries for '20 April 2021' will be grouped to reflect the number of items shown for that date, if that's what you want to sort then you just need custom index per date in the order you expect and use sort by column
2) in the table view, but that doesn't have any implications for the measure/column calculations or visuals, so I doubt this is what you're looking for
Thanks - that helped - much appreicated.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.