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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
vin123
Frequent Visitor

sort 100% stacked bar chart by measure

Hi,

I've read this thread https://community.powerbi.com/t5/Desktop/Sort-100-Stacked-Column-Chart-by-Percentage-Values/m-p/3263...

 

but am finding it hard to apply to my own situation, although I imagine it's similar.

I just want to sort these data by the % of highly cited papers in each journal.

 

stackedbar.JPG

 

I have another categorisation, which is called ESI field, and sits in the slicer. So for whatever ESI field is selected, I'd like the bars to be sorted by journal % of highly cited papers descending.

 

My data structure is this:

esi.JPG

 
 

and I've put both Total Docs and Highly Cited Papers in the Value section.

I also tried to unpivot this data such that the Total Docs and Highly Cited Papers would be an Attribute, so each journal would have 2 rows. But same thing occurs when I put the attribute as the legend, and I can't figure out a way to sort by the largest % of Highly Cited Papers.

 

Any help would be appreciated!

1 ACCEPTED SOLUTION
vin123
Frequent Visitor

I managed to figure this out by creating the percentage measures propHiCi and propNotHiCi and then putting these as the values instead of the actual numbers. Then I could sort by the percentage I wanted to. 

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@vin123 , Go to three dots and sort the required measure/column and check if it works

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

Thanks for replying, this had already been selected as below:

 

3dot.png

 

any ideas?

vin123
Frequent Visitor

I managed to figure this out by creating the percentage measures propHiCi and propNotHiCi and then putting these as the values instead of the actual numbers. Then I could sort by the percentage I wanted to. 

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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