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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Browncorinne
Regular Visitor

How can I rank the questions based on survey response yes

How can I rank the chart below based on the survey question with the most "Yes" question.  

I would also like to identify the top 5 (most yes) /bottom 5 (most no) questions out of the 65 questions

 

Browncorinne_0-1661168867668.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Browncorinne ,

I created some data:

vyangliumsft_0-1661402162792.png

Here are the steps you can follow:

1. Create measure.

Rank =
IF(
    MAX('Table'[Group1])="Yes",
RANKX(FILTER(ALL('Table'),'Table'[Group1]="Yes"),CALCULATE(SUM([Count])),,DESC,Dense))
IF =
IF(
    [Rank] <=5&&[Rank]<>BLANK(),1,0)
Flag =
var _select=SELECTCOLUMNS(FILTER(ALL('Table'),[IF]=1),"1",[Group])
return
IF(MAX('Table'[Group]) in _select,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1661402162796.png

3. Result:

vyangliumsft_2-1661402162803.png

If you need pbix, please click here.

How can I rank the questions based on survey response yes.pbix

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @Browncorinne ,

I created some data:

vyangliumsft_0-1661402162792.png

Here are the steps you can follow:

1. Create measure.

Rank =
IF(
    MAX('Table'[Group1])="Yes",
RANKX(FILTER(ALL('Table'),'Table'[Group1]="Yes"),CALCULATE(SUM([Count])),,DESC,Dense))
IF =
IF(
    [Rank] <=5&&[Rank]<>BLANK(),1,0)
Flag =
var _select=SELECTCOLUMNS(FILTER(ALL('Table'),[IF]=1),"1",[Group])
return
IF(MAX('Table'[Group]) in _select,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1661402162796.png

3. Result:

vyangliumsft_2-1661402162803.png

If you need pbix, please click here.

How can I rank the questions based on survey response yes.pbix

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Browncorinne
Regular Visitor

@Greg_Deckler - Thanks for responding.  I tried the formulas, but I get an error -  I am trying to sum the responses - Yes, Partial, No, NA. 

Browncorinne_1-1661205287478.png

 

@Browncorinne You can't sum strings (text). So, for some reason, you are trying to sum up text values which is likely to not work very well.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Browncorinne See if this article on RANKX helps. To *Bleep* with RANKX! - Microsoft Power BI Community



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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