Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Sorting a bar chart within a date group

I am trying to sort sums on every specific date. There are rates that are valid to the end of every month.


For example, June 30, July 31, etc.


I want the bars to show up in ascending order within those dates.


I can't sort on total because it will make the dates out of order.


I also created a rankx and tried to sort the bar chart on that and experienced the same issue. It seems like the bar graph is summing the rank values by month and then re-ordering the months.


rank = RANKX(FILTER('shipment rates 1','shipment rates 1'[routing_details_effective_end_dt] = EARLIER('shipment rates 1'[routing_details_effective_end_dt])), 'shipment rates 1'[Final Total],,ASC,Dense)
Does anyone know how to do sort by totals on a specific date on the x-axis? For June 30, the bars should be sorted in ascending order. For July 31, the bars should be supported in ascending order. 
And the x-axis dates should not move at all.


Super User
Super User


Share the download link of your PBI file.

Ashish Mathur

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors