Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 11 | |
| 9 | |
| 8 | |
| 8 |