The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
Hi @Browncorinne ,
I created some data:
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.
3. Result:
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
Hi @Browncorinne ,
I created some data:
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.
3. Result:
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
@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 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.
@Browncorinne See if this article on RANKX helps. To *Bleep* with RANKX! - Microsoft Power BI Community
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |