Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello I have a problem, where I create a Slicer(Attribute) and select multiple items to display into the Matrix table it shows me blank spaces which I do not want to see as I only want to see the the values selected. I notice that the Matrix filter has been set to "Or". How can I change it to "And"
For example, when I select 2 subjects on the slicer table (Attribute), it displays blank spaces and values In the Matrix However,i only want the values to appear.
Solved! Go to Solution.
Hi @joeheng123 ,
You need to drag the measure(Subject with AND-Only Condition) into filter pane and choose "is not blank" then apply filter.
Hope this can help you.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi,
Attached below is my code however it not working.
Hi @joeheng123 ,
Please try this:
New Table as slicer:
Subject = VALUES('Table'[Subject])
A measure:
Subject with AND-Only Condition =
var selectedSubject=VALUES(Subject[Subject])
var countRowsFact=
COUNTROWS(
DISTINCT(
SELECTCOLUMNS(
FILTER(
'Table',
RELATED(Subject[Subject]) in selectedSubject
),
"Subject",
RELATED(Subject[Subject])
)
)
)
var countRowsSubject=COUNTROWS(selectedSubject)
return
IF(countRowsFact>=countRowsSubject,countRowsFact)
Hello im having the same issue again i tried numerous times but still unable to change "Or" condition to "And" condition so that my table does not show blank spaces. can anyone assist to provide me the measure code for to copy ?
Hi @joeheng123 ,
You need to drag the measure(Subject with AND-Only Condition) into filter pane and choose "is not blank" then apply filter.
Hope this can help you.
Hi @joeheng123 ,
We need to create a relationship between the two tables while using RELATED function.
And based on the error message, there is an extra ")" in your formula. Please remove one to try again.
I have attached my sample above. You could download it to have a try.