The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
User | Count |
---|---|
69 | |
64 | |
62 | |
54 | |
28 |
User | Count |
---|---|
112 | |
81 | |
65 | |
48 | |
42 |