Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
I want to write a DAX query to show the subcategory along with the Score for a particular category.
For ex- I want to display the sub-category values belonging to animal category. The input is:
Category | sub-category | Score |
Animal | Dog | 1 |
Animal | Cat | 2 |
Animal | Horse | 3 |
Mineral | Quartz | 1 |
Mineral | Silica | 2 |
Mineral | gypsum | 1 |
Mineral | feldspar | 2 |
Vegetable | carrot | 3 |
Vegetable | tomato | 1 |
I want the output as:
Dog | 1 |
Cat | 2 |
Horse | 3 |
Thanks in advance!
Solved! Go to Solution.
@shubhrika , Not sure I got it
Try a measure like this with sub category
calculate(sum(Table[Score]) , filter(Table, Table[Category] = "Animal"))
@shubhrika , Not sure I got it
Try a measure like this with sub category
calculate(sum(Table[Score]) , filter(Table, Table[Category] = "Animal"))
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |