Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 |
Solved! Go to Solution.
Simply add an index column before unpivoting the dataset,
Then, counting is easy,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Simply add an index column before unpivoting the dataset,
Then, counting is easy,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
82 | |
67 | |
61 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |