Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi All,
I Have below data
| Category | Sub Category | Value |
| A | ||
| A2 | 1 | |
| A1 | 12 | |
| B | ||
| B3 | 6 | |
| B1 | 17 |
I need to give switch case as following
| Category | Sub Category | Value | Average | COn |
| A | ||||
| A2 | 1 | 1 | Low | |
| A1 | 12 | 4 | High | |
| B | ||||
| B3 | 6 | 3 | Medium | |
| B1 | 17 | 6 | High |
Dax used :
| Expected O/p | ||||
| Category | Sub Category | low | Medium | High |
| A | 1 | 12 | ||
| A2 | 1 | 12 | ||
| A1 | ||||
| B | 6 | 17 | ||
| B3 | 6 | |||
| B1 | 17 |
As in Power bi Am taking in matrix hierarchy category level values are not correctly adding up and Average value is changing in Category level and wrong values are being displayed.
What ever value we are getting at Subcategory level should be added to Category.
@dax Hierarchy average @amitchandak @v-kkf-msft
Hi @Anonymous ,
I used some virtual data to test, and the results are in line with expectations. Could you share an example pbix to let me know your scene better?
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |