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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
alya1
Helper V
Helper V

How to double sort clustered bar chart visual (2 conditions)?

Hi all,

 

I have a clustered bar chart showing department # on y axis and total approved budget (light blue) vs total used budget (dark blue) on x axis.

alya1_0-1720022925862.png

Some departments already spend their whole budget (approved budget = used budget) and I would like those departments to be shown on the bottom of the graph (3, 4, 5, and 6) ideally by the approved budget amount highest to lowest. 
But for departments with leftover budget or used too much, I would like show them on top and ideally sort them by the approved budget amount highest to lowest. 

Is there a way to double sort the axis? 

Thank you!

1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1720052635389.png

 


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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

I am not sure how much i can help but i'd like to try.  Please share the download link of the PBI file.


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

(I can't share the actual data but please see a sample table (sorry not sure how to attach pbix files):

UnitApproved budgetUsed budget
1620003700
2600000
34500045000
44200042000
53700037000
63500035000
73200023000

 

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1720052635389.png

 


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

thank you so much Ashish! very good idea! 1 more quick question, since I have more units then the sample data, some units where their approved budget = used budget have higher approved budget but larger unit number like below: 

UnitApproved budgetUsed budget
1620003700
2600000
34500045000
44200042000
53700037000
63500035000
73200023000
85500055000
96000060000

In this case when I used your method, the bottom portion where approved budget = used budget is no longer also sorted by the approved budget amount highest to lowest. Any ideas on how to fix this please?

You are welcome.


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

Ah nevermind! I thought of a small trick!
For the last IF measure,
if yes, instead of listing 0, I listed [App]
if no, I listed [App] + random huge number like 1000000 😄 

Shosher
Regular Visitor

So im not 100% sure but i think this might work. 

Click on your visual and turn it into a table. 

Hold the shift button and sort it by as many columns as you want by clicking on the headers. 

Turn it back into a visual. If all went well this would've done it!


Sadly it didn't but thank you for the idea!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.