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
MySurveyHuB
Frequent Visitor

Charting multiple responses questions

Hello Dears,

 

We have a multiple response survey question exported as single column for each answer as 0 if the answer not selected and the answer label if selected.

We need to analysis/chart this question as one question based on number of respondend not the number of responses percentages as below

 

Id  q1_1  q1_2  q1_3

1   A       0      C

2   A      B       0

3   A      0       0          

4   0      B       0

 

as we can see here, we have 4 respondents, A is counted 3 times, B two times, and C one time.

 

we need a chart the present Q1 as A is 75%(3/4), B is 50%(2/4), and C is 25%(1/4)

 

Thanks in advance.

Mahmoud

 

1 ACCEPTED SOLUTION
Vilmar
Resolver I
Resolver I

Veja se ajuda:

  • Transformar colunas em linhas no Power Query;
  • Fazer a medida abaixo.
Medida = 
DIVIDE ( 
    COUNTROWS ( Tabela ), 
    COUNTROWS ( ALL ( Tabela[Valor] ) )
)

Sem título.png 

View solution in original post

8 REPLIES 8
Vilmar
Resolver I
Resolver I

Veja se ajuda:

  • Transformar colunas em linhas no Power Query;
  • Fazer a medida abaixo.
Medida = 
DIVIDE ( 
    COUNTROWS ( Tabela ), 
    COUNTROWS ( ALL ( Tabela[Valor] ) )
)

Sem título.png 

SUPERRRRRRRRRR

thanks a lot

MySurveyHuB
Frequent Visitor

We need the output to be like this

MySurveyHuB_0-1682271379704.png

 

MySurveyHuB
Frequent Visitor

MySurveyHuB_0-1682268485512.png

 

Greg_Deckler
Community Champion
Community Champion

@MySurveyHuB Go into Power Query Editor. Right-click your Id column and choose Unpivot other columns. At this point the calculation should become trivial such as:

Percent Responded Measure =
  VAR __Table = 'Table'
  VAR __NumberAnswered = FILTER(__Table, [Value] <> 0)
  VAR __TotalNumber = COUNTROWS(__Table)
  VAR __Result = DIVIDE( __NumberAnswered, __TotalNumber )
RETURN
  __Result


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 i got this message in the measure calcuation

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

@MySurveyHuB Apologies, missed a COUNTROWS:

Percent Responded Measure =
  VAR __Table = 'Table'
  VAR __NumberAnswered = COUNTROWS(FILTER(__Table, [Value] <> 0))
  VAR __TotalNumber = COUNTROWS(__Table)
  VAR __Result = DIVIDE( __NumberAnswered, __TotalNumber )
RETURN
  __Result


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...

MySurveyHuB_0-1682304861252.png

 

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.