Forum Discussion
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
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])))Pbix attached.
5 Replies
- mussaendaCommunity Champion
Welcome to Power BI!
Please provide sample data and desired output to help you easier.
Thank you!
- RiverDreamsFrequent Visitor
dataNZ filters all status 1Australia filters all status 1 and 2
- v-diye-msftCommunity Support
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])))Pbix attached.