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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
atul9063
Helper III
Helper III

OR Logic in single slicer values

Hi,

I have slicer (with values Churn1,Churn7,Churn28 and No Churn),

 

image.png

 

Selecting churn7 on slicer would filter the below table for Churn='Churn7' or Churn='Churn1' ,similarly on selecting churn28, filter would be Churn='Churn1' or Churn='Churn7' or Churn='Churn28' .

 

Dataset

 

TPID           Churn

1Churn1
2Churn7
3Churn1
4Churn28
5Churn7
6No Churn
1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @atul9063,

 

There are some workarounds. But you should think again first. Because it's confusion. Please download the demo from the attachment.

1. Add an ID column to the slicer table. 

2. Don't establish any relationship.

3. Create a measure.

Measure =
VAR slicer =
    SELECTEDVALUE ( Table1[CHURNAME] )
VAR selected =
    CALCULATETABLE (
        VALUES ( Table1[CHURNAME] ),
        FILTER (
            ALL ( Table1 ),
            'Table1'[ID] <= MIN ( 'Table1'[ID] )
                && Table1[ID] > 0
        )
    )
RETURN
    IF (
        slicer = BLANK (),
        1,
        IF ( MIN ( Table2[Churn] ) IN selected, 1, BLANK () )
    )

OR-Logic-in-single-slicer-values

 

Best Regards,

Community Support Team _ Dale
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

1 REPLY 1
v-jiascu-msft
Employee
Employee

Hi @atul9063,

 

There are some workarounds. But you should think again first. Because it's confusion. Please download the demo from the attachment.

1. Add an ID column to the slicer table. 

2. Don't establish any relationship.

3. Create a measure.

Measure =
VAR slicer =
    SELECTEDVALUE ( Table1[CHURNAME] )
VAR selected =
    CALCULATETABLE (
        VALUES ( Table1[CHURNAME] ),
        FILTER (
            ALL ( Table1 ),
            'Table1'[ID] <= MIN ( 'Table1'[ID] )
                && Table1[ID] > 0
        )
    )
RETURN
    IF (
        slicer = BLANK (),
        1,
        IF ( MIN ( Table2[Churn] ) IN selected, 1, BLANK () )
    )

OR-Logic-in-single-slicer-values

 

Best Regards,

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.