Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Sportily
Frequent Visitor

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 6
johnt75
Super User
Super User

You would need to create a measure which returns 1 if either condition is met then use that as your page level filter

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 YOU

 

VAR result =
CALCULATE (
COUNTROWS ( cr715_session ),
cr715_session[cr715_primaryspacename] = "ENCOUNTER"
|| cr715_session[cr715_secondaryspacename] = "ENCOUNTER"
)
RETURN
IF (TRUE,1,0)
IF ( ISBLANK ( result ), 0, result )

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 )

Thanks John,

Ok, thats alright, I can apply for each visual rather than the page.

Ah ok, I see. Thanks.

Measure gets a thumbs up, but when I apply it I think I'm doing it wrong.... I assumed I need to set it to 'is 1', is that not true? When I do it presents no data. Have I applied it wrong?

Sorry.Screenshot 2022-03-23 160334.jpg

No, that is correct. Is there a field on the visual which comes from the cr715_session table ? If so then that should be restricting the value of the spacename.

Is it possible to share a PBIX ?

The data in the visual seems to be drawing from another table.

Can't share PBIX, sorry.

Don't worry though, you've been massively helpful and I'm going to keep investigating it and learning along the way.

Thank you.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.