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 Folks,
I have hierarchy in matrix visual, where i want same total (7155.62) in Advisory & NY -New york city.
Staff_Target = SWITCH(
TRUE(),
HASONEVALUE(Employees[StaffName]) && HASONEVALUE(Employees[StaffBusinessUnitName])
&& HASONEVALUE(Employees[StaffPosition]) && HASONEVALUE('Calendar'[Month (MMMM)]),[Target],
CALCULATE(
SUMX(Employees,
[Target]),
VALUES(Employees[StaffName]) ))
@amitchandak @lbendlin @amitchauhan @parry2k @AlexisOlson @AllisonW
Regards,
Pratik.S
Solved! Go to Solution.
Hi @Anonymous ,
The value of the hierarchy in the matrix visual can be customized by HASONEVALUE. See the following screenshot to see if this is the result you expect:
M = SUM(Table_test[Value])M_ =
VAR sum_id =
CALCULATE (
SUM ( Table_test[Value] ),
FILTER ( ALL ( Table_test ), Table_test[ID] = MAX ( Table_test[ID] ) )
)
RETURN
IF (
MAX ( Table_test[Category1] ) = "a1",
sum_id,
IF ( HASONEVALUE ( Table_test[ID] ), [M] )
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
The value of the hierarchy in the matrix visual can be customized by HASONEVALUE. See the following screenshot to see if this is the result you expect:
M = SUM(Table_test[Value])M_ =
VAR sum_id =
CALCULATE (
SUM ( Table_test[Value] ),
FILTER ( ALL ( Table_test ), Table_test[ID] = MAX ( Table_test[ID] ) )
)
RETURN
IF (
MAX ( Table_test[Category1] ) = "a1",
sum_id,
IF ( HASONEVALUE ( Table_test[ID] ), [M] )
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
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 |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |