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

Slice data in Power BI based on multiple columns

harshvp07_0-1595406825354.png

Ideally, I want to use just one slicer, instead of two. Source and Target should be sliced using one slicer. 

For example as in the above image if you select NWPS-ERMS and Tyler Corrections, the table should pull all relations between NWPS-ERMS --> Tyler Corrections and Tyler Corrections -->  NWPS-ERMS. 

Let me know if there is way to just have one slicer doing the above functionality instead of using two. 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

At first, you need to create a distinct table as slicer. Then refer to the following measure:

Measure =
VAR a =
    ALLSELECTED ( 'Slicer'[Column1] )
RETURN
    IF (
        SELECTEDVALUE ( 'Table'[Source] ) IN a
            && SELECTEDVALUE ( 'Table'[Target] ) IN a,
        1,
        0
    )

Set the rule in filter pane to show result whose measure is 1.

Here is my test file for your reference.

 

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

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

At first, you need to create a distinct table as slicer. Then refer to the following measure:

Measure =
VAR a =
    ALLSELECTED ( 'Slicer'[Column1] )
RETURN
    IF (
        SELECTEDVALUE ( 'Table'[Source] ) IN a
            && SELECTEDVALUE ( 'Table'[Target] ) IN a,
        1,
        0
    )

Set the rule in filter pane to show result whose measure is 1.

Here is my test file for your reference.

 

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

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.

Top Solution Authors