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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
boscollo
Regular Visitor

Help with all pages filter usign or condition

Dear,

I have a problem to resolve. All my fact are based in two different dimensions and I would like to filter all my pages with two possibilities in theses dimensions. I create a measure, but I can't filter with, at least I use this measure with the dimension data together. I will try to example: I want to do is filter my fact only with mouses or RedDragon products.

 

FilterMyProduct =  IF (OR(CONTAINSSTRING(SELECTEDVALUE(dim_type[type_name]),"mouse"),CONTAINSSTRING(SELECTEDVALUE(dim_brand[brand_name]),"redDragon")), "YES", "NOT")
 
If I use this in the filter, nothing happens.
 
Thanks in advance 
1 ACCEPTED SOLUTION

Xiaoxin, thanks for you reply.

In fact it is not possible to create OR conditions, the measure I can use only in visual content and this is not my case. What I want to do is constrain the dataset to a part of this.

The workaround that I did was create a table with the cartesian product with the dimension keys and the flag and use it to reduce my dataset,

Regards

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Noscollo,

 

You put in on the filter for all page. Just add it for the visual himself. You click on the visual and you will have filter only for this visual

James, this is the problem.

I would like to reduce my dataset only for these products and to do this I need to use an "or" operation and power bi only permit "and" filters between different fields. 

Anonymous
Not applicable

HI @boscollo,

AFAIK, the default filter effects use AND logic to link each filter and you can't change it to OR logic.
The workaround is using a measure expression on the visual level filter to apply the filter effect but they were not able to be used on the report level.
For your requirement, I'd like to suggest you submit an idea to add support with OR logic filters.

Regards,

Xiaoxin Sheng

Xiaoxin, thanks for you reply.

In fact it is not possible to create OR conditions, the measure I can use only in visual content and this is not my case. What I want to do is constrain the dataset to a part of this.

The workaround that I did was create a table with the cartesian product with the dimension keys and the flag and use it to reduce my dataset,

Regards

boscollo
Regular Visitor

James, thanks for the try. But it doesn't work.
If I put the measure together the dimension fields, ok. But I am trying to filter all pages, dragging the measure in the filter column.

boscollo_0-1652964634566.png

 


Regards

Anonymous
Not applicable

Hi

Try This

Measure=

if(or(SELECTEDVALUE(dim_type[type_name]) ="mouse",SELECTEDVALUE(dim_brand[brand_name])="redDragon"),"Yes","Not")

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors