Forum Discussion
sdalle
Aug 09, 2021Copper Contributor
Pivot tables: columns without nesting?
Hi, I have a dataset with a set of multiple variables that all have the same structure. They are questions with yes/no answers, and I want to know the % of cases that answered yes. I would like to s...
SergeiBaklan
Aug 09, 2021Diamond Contributor
You may create helper table
Add it and source table to data model and build relationships
Add 3 DAX measures as
livestock index:=CALCULATE(COUNT(Table1[_index]), USERELATIONSHIP(Answers[Answer],Table1[livestock]))
another two are similar.
Use above measures building PivotTable from data model
Another way is to unpivot your source table using Power Query and build PivotTable on resulting table.