Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
47 | |
28 | |
23 | |
18 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |