Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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"))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |