Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
jamestieu1
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)
 
jamestieu1_1-1664572009200.png
 
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.

 

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors