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
jaquelethargic
New Member

AND/OR Logic

I am really having trouble with Power BI and multiple slicer logic. I will simplify my data a bit to hopefully make it easier to convey my lack of understanding. 

 

I have a table OUTPUT that contains the following columns {verified_first, verified_last, verified_phone, verfied_email} where my intention is to allow a user to select values using a slicer to see what the rate would be for different combinations. Essentially, a way to model different scenarios.
For example:
1: verified_last AND verified_phone = 50 records
2: verfied_first AND verified_last AND verified_phone = 40 records
3: verfied_first AND verified_last OR verified_phone = 55 records

I have found a way to get the results I am looking for in DAX by using some calculations and new columns, but this of course requires syntax to change in order to allow for specific conditions to be tested. An example:

OR Filter = IFOR(
                    SELECTEDVALUE(OUTPUT [verified_phone ]) in ALLSELECTED(PHONE_Val[verified_phone]),
                    AND(
                            SELECTEDVALUE(OUTPUT [verified_first]) in ALLSELECTED(FNAME_Val[verified_first]), 
                            SELECTEDVALUE(OUTPUT [verified_last]) in ALLSELECTED(LNAME_Val[verified_last]), 
                ), "PASS", "FAIL")

But again, there doesn't seem to be a simple way to construct logic for a Power BI dashboard. The values in a given slider uses OR logic while sliders in conjunction with each other use AND. 

Has anyone seen an example of a Power BI dashboard using configurable logic in the following manner?
jaquelethargic_1-1679549804305.png

 

1 REPLY 1
lbendlin
Super User
Super User

 The values in a given slider uses OR logic while sliders in conjunction with each other use AND. 

Correct. This is a design decision, and it is the expected behavior for the UI.  If you don't like that, please consider voting for an existing idea or raising a new one at https://ideas.powerbi.com

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.