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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to show 2 values in one column

Hello all, I want to make a survey report. The requirement is fairly straightforward.

For each column, it has 5 possible answers(all are strings)

5

4

3

2

1

I just want to calculate the percentage of the sum of both 5 and 4 to the total responses(5+4+3+2+1) and plot it in a graph. I know how to plot all 5 in different bars in a bar diagram. But no idea how to combine just 2 of those 5. Please help

1 ACCEPTED SOLUTION

Hi @Anonymous ,

you can use

Measure =
VAR _Count4_5 =
CALCULATE(
          COUNTROWS('Facts34'),
          'Facts34'[Column] IN {4,5}
        )
VAR _Count_All =
COUNTROWS('Facts34')
RETURN
DIVIDE(_Count4_5,_Count_All)
 
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

8 REPLIES 8
Anonymous
Not applicable

Hello @mangaus1111.

Sorry, If I was not clear. I don't want to count the values. For some surveys they keep the responses as 

"strongly agree, agree, neutral, disagree, and strongly disagree". So counting the values is not a sustainable solution.

5,4,3,2 and 1 are the rating given to a particular survey question. I just want to calculate the total number of people who responded with 5 or 4 rating and plot it against the total number of people who attended the survey.

 

After ploting all the 5 results is there any way to group just 2 of those bars in the bar diagram into one? That is also a viable solution

hI @Anonymous ;

then your expected result is 50% in my below sample table?

Anonymous
Not applicable

@mangaus1111  Yes precisely. 

Hi @Anonymous ,

you can use

Measure =
VAR _Count4_5 =
CALCULATE(
          COUNTROWS('Facts34'),
          'Facts34'[Column] IN {4,5}
        )
VAR _Count_All =
COUNTROWS('Facts34')
RETURN
DIVIDE(_Count4_5,_Count_All)
 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@mangaus1111 , thank you. this sounds like a viable solution. But I got a doubt if you don't mind. The output value will be 0.5 right? How do I show it as 50% in the graph? I am not able to show it as percentage in the graph since I can't use measures in both x and y axis

I don´t know which kind of graph you are using, but generally first you clik on the measure and then you change the format as percentage.

mangaus1111_0-1667770184298.png

 

Anonymous
Not applicable

Thank you for the answer. I think that solves my issue. 🙂

 

mangaus1111
Solution Sage
Solution Sage

Hi @Anonymous ,

do you need a measure like this or something different?

mangaus1111_0-1667766000513.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors