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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors