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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
badger123
Resolver I
Resolver I

Slicer Magic

Is there a clever way for me to create a slicer that works in an inverse manner, sort of like exclusions... Slicer has the items in (items 1, 2 and 3) and visual has the phrases. If I select item 2 in slicer, I would like the table visual to show only phrase 2, because phrases 1 and 3 are related to item 2. 

 

Backend table:

long_phraserelated_item
phrase 1item 1
phrase 1item 2
phrase 2item 1
phrase 3item 1
phrase 3item 2
phrase 3item 3

 

Desired output based on above example, table visual:

long_phrase
phrase 2

 

 

Thanks in advance!

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @badger123 ,

 

New a calculated table which is unlinked to source table 'Table3'. Add [related_item] from this table into slicer.

slicer table = VALUES(Table3[related_item])

1.png

 

Create below measures, add it to visual level filter and set its value to 1.

Measure_1 =
VAR _slicerselection =
    SELECTEDVALUE ( 'slicer table'[related_item] )
VAR _itemlist =
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( Table3 ),
            Table3[long_phrase] = SELECTEDVALUE ( Table3[long_phrase] )
        ),
        Table3[related_item],
        ","
    )
RETURN
    IF ( ISERROR ( FIND ( _slicerselection, _itemlist ) ), 1, 0 )

2.png

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft
Employee
Employee

Hi @badger123 ,

 

New a calculated table which is unlinked to source table 'Table3'. Add [related_item] from this table into slicer.

slicer table = VALUES(Table3[related_item])

1.png

 

Create below measures, add it to visual level filter and set its value to 1.

Measure_1 =
VAR _slicerselection =
    SELECTEDVALUE ( 'slicer table'[related_item] )
VAR _itemlist =
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( Table3 ),
            Table3[long_phrase] = SELECTEDVALUE ( Table3[long_phrase] )
        ),
        Table3[related_item],
        ","
    )
RETURN
    IF ( ISERROR ( FIND ( _slicerselection, _itemlist ) ), 1, 0 )

2.png

 

Best regards,

Yuliana Gu

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.