Forum Discussion
PowerBi Slicer and Matrix Visualisation Issue
- 5 years ago
Hi Anonymous ,
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.
Slicers are always an OR condition, but you can create a custom measure to get the AND result you want.
See if this post can help you out: https://community.powerbi.com/t5/Desktop/Slicer-with-quot-AND-quot-logic/td-p/592018
If you need it specific to your scenario you will need to provide sample data please.
PS, I am going to move this to Desktop thread where it will get more views and help since it is not related specifically to Power Query. Cheers!
Hi,
Attached below is my code however it not working.
- v-xuding-msft5 years agoCommunity Support
Hi Anonymous ,
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)- Anonymous5 years agoNot applicableHi i tried the measure code and it does not seem to work do you know how i can resolve this issue?
- v-xuding-msft5 years agoCommunity Support
Hi Anonymous ,
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.
- Anonymous5 years agoNot applicable
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 ?
- v-xuding-msft5 years agoCommunity Support
Hi Anonymous ,
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.