Forum Discussion
tejapowerbi123
Helper V
5 years agoTranspose or Unpivot Column?
Hello Community,
Please review the below,
Can anyone suggest to me how to do it?
I have tried Transpose and Unpivot Column in Power Query but did not get the expected result.
What do I want to do?
Column A,
I am looking for a separate count for 1,2,3,4,5
count "1" in column A=2
count "2" in column A=1
| Raw Data | ||||
| A | B | C | D | E |
| 1 | 2 | 3 | 5 | 4 |
| 5 | 5 | 2 | 5 | 4 |
| 4 | 4 | 2 | 1 | 1 |
| 3 | 2 | 4 | 1 | 5 |
| 1 | 2 | 5 | 3 | 4 |
| 5 | 4 | 3 | 2 | 1 |
| 2 | 1 | 4 | 3 | 5 |
| Final Result | |||||
| 1 | 2 | 3 | 4 | 5 | |
| A | 2 | 1 | 1 | 1 | 2 |
| B | 1 | 3 | 0 | 2 | 1 |
| C | 0 | 2 | 2 | 2 | 1 |
| D | 2 | 1 | 2 | 0 | 0 |
| E | 2 | 0 | 0 | 3 | 2 |
Simply add an index column before unpivoting the dataset,
Then, counting is easy,
1 Reply
- CNENFRNL
Community Champion