Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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]
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!
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
Proud to be a Super User!