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
RiverDreams
Frequent Visitor

Slicer help with OR filter

Hi,

 

I am new here and it's my second month of using Power BI as an intern. Sorry if this has been posted already or resolved but I am not able to put this in to Power BI as sames as what I did in Excel.

 

I want to create a slicer in Power Bi desktop to filter my table.

 

Slicer has 2 selection Australia and NZ

 

My source basically has a column with 0, 1 and 2 entered as data.

 

What I want is, if I clicked on NZ on the slicer it will filter and show all data with 1 on them.

If I clicked on Australia it will filter 1 and 2 only (not including 0).

 

I know it seems so basic, but I hope you can help me with this.

 

Many thanks

River

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @RiverDreams ,

 

Please let me know if you'd like to get below result: 

NewStatus = IF(SELECTEDVALUE('Table (2)'[Column1]) = "Australia",CALCULATE(MAX('Table'[Status]),FILTER('Table',[Status]=1)),IF(SELECTEDVALUE('Table (2)'[Column1])="NZ",CALCULATE(MAX('Table'[Status]),FILTER('Table',[Status]=1||[Status]=2)),MAX('Table'[Status])))

1.PNG2.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

5 REPLIES 5
mussaenda
Super User
Super User

Welcome to Power BI!

 

Please provide sample data and desired output to help you easier.

Thank you!

datadataNZ filters all status 1NZ filters all status 1Australia filters all status 1 and 2Australia filters all status 1 and 2

Hi @RiverDreams ,

 

Please let me know if you'd like to get below result: 

NewStatus = IF(SELECTEDVALUE('Table (2)'[Column1]) = "Australia",CALCULATE(MAX('Table'[Status]),FILTER('Table',[Status]=1)),IF(SELECTEDVALUE('Table (2)'[Column1])="NZ",CALCULATE(MAX('Table'[Status]),FILTER('Table',[Status]=1||[Status]=2)),MAX('Table'[Status])))

1.PNG2.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

2019_08_27_09_14_21_Untitled_Power_BI_Desktop.png

 

This Result is based on your data screenshot. This is your desired output?

@mussaenda 

Yes this is the exact output that I am looking for. What is the best approach on this? Thanks

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.