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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
HelloWorld1994
New Member

Summarize Q&A Data One Table of Rows to a Table of Columns

Hello,
I have two tables a Questions Table and a Response Table

[Questions] table has the [QuestionLabel], [ColumnRefName], [Category], and [SortOrder]
The [ResponseTable] is based on ResponseID per row and each column is a question which can be tied to [Questions].[ColumnRefName]. Each question is a binary response of 1/0. 

I want a summary table:
[QuestionSummary]
- [QuestionLabel]
- [Category]
- [SortOrder]
- [Count of Yes] (Sum since yes = 1)
- [Percentage of Yes] 

HelloWorld1994_0-1697729026405.png

 




 I cant unpivot the response table as it's very large and unpivoting causes massive loading issues. I've tried summarizecolumns but I think it's because of my lack of knowledge then the incorrect way. 

Please Help! Thanks!



1 REPLY 1
DataInsights
Super User
Super User

@HelloWorld1994,

 

Try these measures:

 

Count of Yes = 
SUMX (
    VALUES ( Questions[Column Name] ),
    SWITCH (
        Questions[Column Name],
        "Snow", CALCULATE ( COUNT ( Responses[Snow] ), Responses[Snow] = 1 ),
        "Mud", CALCULATE ( COUNT ( Responses[Mud] ), Responses[Mud] = 1 ),
        "Debris", CALCULATE ( COUNT ( Responses[Debris] ), Responses[Debris] = 1 )
    )
)
Percentage of Yes = 
VAR vRowCount =
    // for an individual row, multiply by 1; for the total row, multiply by the row count times the number of values in Column Name
    COUNTROWS ( Responses ) * COUNTROWS ( VALUES ( Questions[Column Name] ) )
VAR vResult =
    DIVIDE ( [Count of Yes], vRowCount )
RETURN
    vResult

 

DataInsights_0-1701037358924.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors