Forum Discussion
Page filter: OR relating to multiple fields
Hi everyone.
Is it possible to apply a Page Filter which says:
Filter results, to show results where
This field = ANDY
OR
This other field = ANDY
I can do this when building a filter for a view in PowerApps, but not sure how to do it in a PowerBI visualisation sheet.
Thanks so much
Chris
6 Replies
- johnt75Super User
You would need to create a measure which returns 1 if either condition is met then use that as your page level filter
- SportilyFrequent Visitor
Ah, ok, great shout, thank you.
Is it true that a measure can only be applied to a visual filter, not as a whole page filter?I'm so newbie, but trying hard to learn.
I had a go with this, but its clearly not right. Is it too much to ask for a hint here, where you might just laugh at my attempt.
THANK YOUVAR result =CALCULATE (COUNTROWS ( cr715_session ),cr715_session[cr715_primaryspacename] = "ENCOUNTER"|| cr715_session[cr715_secondaryspacename] = "ENCOUNTER")RETURNIF (TRUE,1,0)IF ( ISBLANK ( result ), 0, result )- johnt75Super User
I think you may be right about the page level vs visual level filter with measures.
For the filter, try
IF ( SELECTEDVALUE( cr715_session[cr715_primaryspacename]) = "ENCOUNTER" || SELECTEDVALUE( cr715_session[cr715_secondaryspacename]) = "ENCOUNTER" , 1 )