cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors