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 have created a matrix where i have 4 levels. Category, sub category, task and sub task. Now i want when i collapse at task level, all sub task child values average should be shown in task level and so on till top level. The value i am showing is Pass% which i am calculting in different measure which is Pass% measure.
i managed to created DAX which is giving correct average values till sub category level but category level the average shown is not correct. Can someone please help. I am stuck.
DAX i used:
Average Values =
IF(
ISINSCOPE('Data Sheet'[Task]),
[Pass % Measure],
AVERAGEX(
VALUES('Data Sheet'[Task]),
[Pass % Measure]
)
)
Solved! Go to Solution.
Hi @Aish33454
Can you please try the below DAX ?
Average Values =
SWITCH(
TRUE(),
ISINSCOPE('Data Sheet'[Sub Task]), [Pass % Measure],
ISINSCOPE('Data Sheet'[Task]),
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
),
ISINSCOPE('Data Sheet'[Sub Category]),
AVERAGEX(
VALUES('Data Sheet'[Task]),
CALCULATE(
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
)
)
),
ISINSCOPE('Data Sheet'[Category]),
AVERAGEX(
VALUES('Data Sheet'[Sub Category]),
CALCULATE(
AVERAGEX(
VALUES('Data Sheet'[Task]),
CALCULATE(
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
)
)
)
)
)
)
If this answers your questions, kindly accept it as solution and give kudos.
This is great. Thank you so much.
But this measure is not working when i am trying to use in Paypal KPI donut chart. Is there a way to make this work in other visuals as well?
Hi @Aish33454
For donut chart can you please try this.
Average Values =
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
)
If this answers your questions, kindly accept it as a solution and give kudo.
I want at category level, to display the same average va;ue which is in my matrix at top most level.
I tried this measure and others but its giving some different values. I dont exactly know how power bi is calculting the values.
Hi @Aish33454
Can you please try the below DAX ?
Average Values =
SWITCH(
TRUE(),
ISINSCOPE('Data Sheet'[Sub Task]), [Pass % Measure],
ISINSCOPE('Data Sheet'[Task]),
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
),
ISINSCOPE('Data Sheet'[Sub Category]),
AVERAGEX(
VALUES('Data Sheet'[Task]),
CALCULATE(
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
)
)
),
ISINSCOPE('Data Sheet'[Category]),
AVERAGEX(
VALUES('Data Sheet'[Sub Category]),
CALCULATE(
AVERAGEX(
VALUES('Data Sheet'[Task]),
CALCULATE(
AVERAGEX(
VALUES('Data Sheet'[Sub Task]),
[Pass % Measure]
)
)
)
)
)
)
If this answers your questions, kindly accept it as solution and give kudos.
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 |