Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I'm trying to create a measure to show a calculation for values other than the variable indicated in the row label. For instance, in the data below (Table), I want to be able to do a calculation for X, but also show the calculation for all NOT-X, Calculate for Y and show all NOT-Y, etc.
Ideally, my final table would be something like this, with the potential to add filters.
In this table, the Ave(not Variable) for X is calculating the average of Y and Z. Any help would be appreciated. Let me know if there is anything I should clarify.
Thank you,
J
Solved! Go to Solution.
Using the data table you provided, you can create two measures to get the desired result:
# Avg Value = AVERAGE(FilterTable[Value])
# Avg Not Value =
VAR ThisVariable = MAX(FilterTable[Variable])
RETURN
CALCULATE(
[# Avg Value],
FILTER(
ALL(FilterTable),
NOT(FilterTable[Variable] = ThisVariable)
),
VALUES(FilterTable[Filter])
)
Here are the results when no Filter slicer is applied:
And with the Filter slicer:
Please accept this as the solution if this solves your problem.
Using the data table you provided, you can create two measures to get the desired result:
# Avg Value = AVERAGE(FilterTable[Value])
# Avg Not Value =
VAR ThisVariable = MAX(FilterTable[Variable])
RETURN
CALCULATE(
[# Avg Value],
FILTER(
ALL(FilterTable),
NOT(FilterTable[Variable] = ThisVariable)
),
VALUES(FilterTable[Filter])
)
Here are the results when no Filter slicer is applied:
And with the Filter slicer:
Please accept this as the solution if this solves your problem.
@AUaero Is there a solution if I am being asked to add a second filter (Filter2) to this table? With 2 filters, the Not Value calculation should still calculate based on the values remaining after the filters have been selected.
(I also noticed that my example for Filter B, Variable Y should have an Avg Not Value of 18.5. Thank you for correcting that oversight.)
Thank you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |