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.
Hi,
I am trying to create a DAX formula that combined totals from multiple columns ( Type 1 & Type 2 from table) that I can later visualise in a chart.
# | Name | Type 1 | Type 2 |
1 | Bulbasaur | Grass | Poison |
2 | Ivysaur | Grass | Poison |
3 | Venusaur | Grass | Poison |
4 | Charmander | Fire | |
5 | Charmeleon | Fire | |
6 | Charizard | Fire | Flying |
7 | Squirtle | Water | |
8 | Wartortle | Water | |
9 | Blastoise | Water | |
23 | Ekans | Poison | |
24 | Arbok | Poison |
An example of what the totals would look like would be:
Type | Total |
Grass | 3 |
Fire | 3 |
Water | 3 |
Poison | 5 |
Flying | 1 |
Any help is much appreciated,
Thanks
Solved! Go to Solution.
Hi,
Using the Query Editor, select the first 2 columns > right click > Unpivot other columns. Now build a table visual and drag Attribute to the visual. Use this measure
=COUNTROWS(Data)
Hope this helps.
Hi,
Using the Query Editor, select the first 2 columns > right click > Unpivot other columns. Now build a table visual and drag Attribute to the visual. Use this measure
=COUNTROWS(Data)
Hope this helps.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |