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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Sort 100% Stacked Column Chart by Percentage Values

In my Power BI Desktop file, I'm using the 100% Stacked Column Chart to compare 2 values for 10 people and the only options to sort the bars are:

  • x-axis value (person's name)
  • Value 1 of the bar chart
  • Value 2 of the bar chart

But, I want the bar charts to sort by the Value 1 % (which is Value 1 / [Value 1 + Value 2]) or the Value 2 %.  Thus, in the screenshot below, it would look like a waterfall with the blue colors sorting largest to smallest.

 

Is there a workaround for this?  Or something I'm not thinking of?

 

PBIDesktop_2016-05-02_08-37-11.png

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Okay I got the %s you say in the Post above - and they calculate exactly as you say!

 

However we were there before with the calculated columns only - those were producing the same results?

And you said they were wrong?

Sort 100% Stacked Column Chart7.png

 

 

View solution in original post

23 REPLIES 23
Anonymous
Not applicable

Cool. I'm looking forward to hearing more.

Ah, missed the part about it being a measure.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I think this would work:

 

Add a calculated column that contains the percentage value that you'd like to sort by. Call it "Sort_Pct" or something. Refresh the report and then go back to that sort menu in the top right of the column chart. The new Sort_Pct column should be an option there. 

 

(Sorry for lack of detail I haven't had time to test this and this is just from memory.)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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