英文:
Table containing the count of multiple columns?
问题
我有以下的表格:
问题 1 | 问题 2 | 问题 3 |
---|---|---|
a | a | b |
b | a | c |
a | c | e |
c | b | e |
a | d | a |
我如何创建一个数据透视表(或类似的东西),其中包含每个问题的答案计数?
即类似以下的结果:
值 | 问题 1 计数 | 问题 2 计数 | 问题 3 计数 |
---|---|---|---|
a | 3 | 2 | 1 |
b | 1 | 1 | 1 |
c | 1 | 1 | 1 |
d | 0 | 1 | 0 |
e | 0 | 0 | 2 |
英文:
I've got the following table:
Question 1 | Question 2 | Question 3 |
---|---|---|
a | a | b |
b | a | c |
a | c | e |
c | b | e |
a | d | a |
How do I create a pivot table (or something similar) containing the count of answers per question?
i.e. something like the following:
Value | Question 1 Count | Question 2 Count | Question 3 Count |
---|---|---|---|
a | 3 | 2 | 1 |
b | 1 | 1 | 1 |
c | 1 | 1 | 1 |
d | 0 | 1 | 0 |
e | 0 | 0 | 2 |
Creating it with one Column is easy enough, however I can't figure out how to do it with multiple columns because libreoffice will start stacking the rows/columns.
I'd appreciate any help or nudge in the right direction.
I tried creating a pivot table containing multiple rows/columns. I've already tried it by selecting my questions and putting them all in row or column, however libreoffice will start stacking them, creating subcolumns/rows without the correct result.
答案1
得分: 0
I've created a makeshift solution.
It's basically the following somewhere else in the sheet:
值 | 问题 1 | 问题 2 | 问题 3 |
---|---|---|---|
a | =COUNTIF(A$2:A$122;"a") |
=COUNTIF(B$2:B$122;"a") |
=COUNTIF(C$2:C$122;"a") |
b | =COUNTIF(A$2:A$122;"b") |
=COUNTIF(B$2:B$122;"b") |
=COUNTIF(C$2:C$122;"b") |
c | =COUNTIF(A$2:A$122;"c") |
=COUNTIF(B$2:B$122;"c") |
=COUNTIF(C$2:C$122;"c") |
不是最美观的解决方案,但目前可行。不过,我会欣然接受更好的建议。
英文:
I've created a makeshift solution.
It's basically the following somewhere else in the sheet:
Value | Question 1 | Question 2 | Question 3 |
---|---|---|---|
a | =COUNTIF(A$2:A$122;"a") |
=COUNTIF(B$2:B$122;"a") |
=COUNTIF(C$2:C$122;"a") |
b | =COUNTIF(A$2:A$122;"b") |
=COUNTIF(B$2:B$122;"b") |
=COUNTIF(C$2:C$122;"b") |
c | =COUNTIF(A$2:A$122;"c") |
=COUNTIF(B$2:B$122;"c") |
=COUNTIF(C$2:C$122;"c") |
not the most beautiful solution but it works for now. I'd appreciate a better one though.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论