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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to OR filter with more than 2 (Logical1;Logical2) ?

Good afternoon,

 

I created a calculate which I tried to insert more than 2 filter but it is not possible on the OR function :

 

FILTER('Countries; OR('Countries'[Country] = "Belgium"; 'Countries'[Country] = "France")));
 
I would like to add Suisse and UK, how can I do ? 
 
Thank you.
1 ACCEPTED SOLUTION
judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

The OR fucntion only allows 2 conditions.

 

For 3+ conditions you can either nest OR statements or use the double pipe symbols (||)

 

For your case it would be as follows;

 

FILTER('Countries; 'Countries'[Country] = "Belgium" || 'Countries'[Country] = "France" || 'Countries'[Country] = "Suisse" || 'Countries'[Country] = "UK" ));

 

Hope this helps,

 

George

 

View solution in original post

2 REPLIES 2
judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

The OR fucntion only allows 2 conditions.

 

For 3+ conditions you can either nest OR statements or use the double pipe symbols (||)

 

For your case it would be as follows;

 

FILTER('Countries; 'Countries'[Country] = "Belgium" || 'Countries'[Country] = "France" || 'Countries'[Country] = "Suisse" || 'Countries'[Country] = "UK" ));

 

Hope this helps,

 

George

 

Anonymous
Not applicable

Thank you very much @judspud ! 🙂 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.