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
One more way is with dynamic arrays
=LET(
total, COUNTA(Table1[_index]),
CHOOSE({1,2,3},
COUNTIFS(Table1[crop], "="&G37:G39)/total,
COUNTIFS(Table1[livestock], "="&G37:G39)/total,
COUNTIFS(Table1[flood], "="&G37:G39)/total)
)
Please check attached.
sdalle
Aug 10, 2021Copper Contributor
@Segei Baklan, Detlef_Lewin, thank you so much for your responses. I managed to figure out the power query approach after studying the files you sent and reading about unpivoting columns. It is very straightforward, now that I understand. There is so much to learn about Excel - thank you!