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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BrunoT
Frequent Visitor

Horizontal bar chart with multiple measures/colums

Hi, 

I got a table like this:

USER_IDQuestion 1Question 2Question 3Question 4
FR_20250501_24YesYesYesNo
FR_20250501_29NoNoYesYes
FR_20250501_144YesYesNoNo
FR_20250501_67NoNoNoNo
FR_20250501_64NoYesYesNo
FR_20250501_27NoNoYesYes
FR_20250501_159YesYesNoYes
FR_20250501_134NoNoYesNo
FR_20250501_68YesYesYesYes
FR_20250501_77NoYesNoYes


And I would build a horizontal barchart like this:

BrunoT_1-1742574494325.png

Where each bar is the percentage of users saying Yes:

 YesNo
Question 140%60%
Question 260%40%
Question 360%40%
Question 450%50%

 

I created 4 measures like:

Q1_Yes = 
DIVIDE(
    CALCULATE(
        DISTINCTCOUNT(DATA[USER_ID]),
        DATA[Question 1] = "Yes"
    ),
    DISTINCTCOUNT(DATA[USER_ID])
)

Is it the right approach?

Probably I scould use a measures with VAR and RETURNS or an SVG,  could you help me?

 

2 ACCEPTED SOLUTIONS
BrunoT
Frequent Visitor

Tutu_in_YYC
Super User
Super User

Turn your table to this:

Tutu_in_YYC_0-1742588760052.png

 

And then do this

YES =
DIVIDE
(
    CALCULATE(
       COUNTROWS('Table'),
        'Table'[Value] = "YES"
    ),
    COUNTROWS('Table')
)
 
And this
Tutu_in_YYC_2-1742589996165.png

 

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1742617896420.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Tutu_in_YYC
Super User
Super User

Turn your table to this:

Tutu_in_YYC_0-1742588760052.png

 

And then do this

YES =
DIVIDE
(
    CALCULATE(
       COUNTROWS('Table'),
        'Table'[Value] = "YES"
    ),
    COUNTROWS('Table')
)
 
And this
Tutu_in_YYC_2-1742589996165.png

 

BrunoT
Frequent Visitor

Here the .pbix https://we.tl/t-xCUQqnTrE6

 

Hi @BrunoT,

 

We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.

 

Thank you.

Hi @BrunoT,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @BrunoT,
I wanted to check if you had the opportunity to review the information provided by @Ashish_Mathur @Tutu_in_YYC . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.