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 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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |