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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
alya1
Helper IV
Helper IV

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.