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.
Hi,
Attached below is my code however it not working.
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.