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 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"))
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |