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.
Someone please help me!
I have to show data in a matrix depending on a value in another column.
If value = x - I need to show rows MPC Current, MPC Budget, MPC Variance, NCR Current, NCR Budget, NCR Variance
else
If value = y - I need to show all other rows
Am I going about this the wrong way? How do I do this?
Solved! Go to Solution.
Hi, @EMSSS22
You can add a custom filter measure and drag it to visual filter pane to filter data.
filter =
SWITCH (
SELECTEDVALUE ( Slicer[Value] ),
"x",
IF (
SELECTEDVALUE ( Sheet1[row] )
IN {
"MPC Current",
"MPC Budget",
"MPC Variance",
"NCR Current",
"NCR Budget",
"NCR Variance"
},
1,
0
),
"y",
IF (
NOT SELECTEDVALUE ( Sheet1[row] )
IN {
"MPC Current",
"MPC Budget",
"MPC Variance",
"NCR Current",
"NCR Budget",
"NCR Variance"
},
1,
0
),
1
)
Please check my attached pbix for more details.
Best Regards,
Community Support Team _ Eason
Hi, @EMSSS22
You can add a custom filter measure and drag it to visual filter pane to filter data.
filter =
SWITCH (
SELECTEDVALUE ( Slicer[Value] ),
"x",
IF (
SELECTEDVALUE ( Sheet1[row] )
IN {
"MPC Current",
"MPC Budget",
"MPC Variance",
"NCR Current",
"NCR Budget",
"NCR Variance"
},
1,
0
),
"y",
IF (
NOT SELECTEDVALUE ( Sheet1[row] )
IN {
"MPC Current",
"MPC Budget",
"MPC Variance",
"NCR Current",
"NCR Budget",
"NCR Variance"
},
1,
0
),
1
)
Please check my attached pbix for more details.
Best Regards,
Community Support Team _ Eason
Thats great thank you.
Is there a way of making the slicer automatically detect whether it's 0 or 1 based off another field? rather then manually having to select the right number?
Look forward to hearing back and thanks for all the help!
Hi, @EMSSS22
If I understand correctly, you don't want to use slicers to control data filtering. If so, please delete the slicer and
replace 'SELECTEDVALUE(Slicer[Value])' with 'SELECTEDVALUE(Table[Another field])' in the original formula.
Best Regards,
Community Support Team _ Eason
@EMSSS22 , if these are row values, you can control them using measures.
Switch(selectedvalues(Value[Value]),
"X", calculate([Measure], filter(Table, Table[Metric] in {" MPC Current", "MPC Budget", "MPC Variance"}) ,
[Measure]
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |