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

Two Slicers to multiple columns of one table

Hi,

I would to add two slicers to my dashboard which will be filtering table as rules below:
Slicer1 - filter columns 'A Rack' and 'B Rack'

Slicer2 - filter columns 'A Equip' and 'B Equip'

If I will select value in slicer1 then table need to show all rows if have values in column 'A Rack' or/and in column 'A Rack', slicer2 dropdown list will be filtered also. Same functionality if I will select value in Slicer2.

 

I tried this solution Solved: Once Slicer for multiple columns - Microsoft Power BI Community  but it's working for one slicer only.

 

My data table have few thousends of rows with connections from A end to B end on different sites. Example of my table:

Site nameA RackA EquipB RackB EquipLength
site Arack A1device 1rack B1device 222
site Arack A1device 1rack B1device 222
site Arack A2device 1rack B2device 332
site Arack A3device 4rack B2device 334
site Arack B1device 2rack B2device 336
site Arack B1device 2rack B2device 336
site Arack B2device 3rack A3device 48
site Arack B3device 3rack A3device 48
site Arack B1device 3rack A1device 110
site Arack B1device 3rack A1device 110
site Brack A1device 11rack B1device 2211
site Brack A1device 11rack B1device 2212
site Brack A2device 11rack B2device 313
site Brack A3device 4rack B2device 314
site Brack B2device 2rack B2device 315
site Brack B2device 2rack B2device 315
site Brack B2device 3rack A2device 4117
site Brack B3device 13rack A3device 1418
site Brack B4device 3rack A1device 1120
site Brack B4device 3rack A1device 1120

 

Will be it possible to implement?

Thanks in advance 🙂

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous,

 

 Create two slicer table as:

Slicer1 = 
DISTINCT(
    UNION(
        VALUES('Table'[A Rack]),
        VALUES('Table'[B Rack])
    ) )
Slicer2 = 
DISTINCT(
    UNION(
        VALUES('Table'[A Equip]),
        VALUES('Table'[B Equip])
    ) )

Create two measures as:

Measure = 
IF(
    MAX(Slicer1[A Rack])=MAX('Table'[A Rack])||MAX(Slicer1[A Rack])=MAX('Table'[B Rack]),
    1,
    0)
Measure 2 = 
IF(
    MAX(Slicer2[A Equip])=MAX('Table'[A Equip])||MAX(Slicer2[A Equip])=MAX('Table'[B Equip]),
    1,
    0)

Drag the measures into filter as:

v-xulin-mstf_0-1614322672539.png

 

Please try this demo and check if it works.

 

Best Regards,

Link

 

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

5 REPLIES 5
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous,

 

 Create two slicer table as:

Slicer1 = 
DISTINCT(
    UNION(
        VALUES('Table'[A Rack]),
        VALUES('Table'[B Rack])
    ) )
Slicer2 = 
DISTINCT(
    UNION(
        VALUES('Table'[A Equip]),
        VALUES('Table'[B Equip])
    ) )

Create two measures as:

Measure = 
IF(
    MAX(Slicer1[A Rack])=MAX('Table'[A Rack])||MAX(Slicer1[A Rack])=MAX('Table'[B Rack]),
    1,
    0)
Measure 2 = 
IF(
    MAX(Slicer2[A Equip])=MAX('Table'[A Equip])||MAX(Slicer2[A Equip])=MAX('Table'[B Equip]),
    1,
    0)

Drag the measures into filter as:

v-xulin-mstf_0-1614322672539.png

 

Please try this demo and check if it works.

 

Best Regards,

Link

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

This do the job. I modified a bit a measure to show all in case no value in slicer - added ISFILTERED.

Measure 2 = 
IF(
    ISFILTERED(Slicer2[A Equip]),
    IF(
        MAX(Slicer2[A Equip])=MAX('Table'[A Equip])||MAX(Slicer2[A Equip])=MAX('Table'[B Equip]),
        1,
        0),
    1)

 Will be possible to make it working for multiple selections? I would to use visual Smart Filter by OKVIZ or maybe you know a better visual for that? The important think for me is to have possibility to start typing value.

Hi @Anonymous,

 

You can use similar methods to create more dimensional tables to make it working for multiple selections.

The visual Smart Filter by OKVIZ is really a good choice!

 

Best Regards,

Link

 

amitchandak
Super User
Super User

@Anonymous , You have 4 independent table. 2 for each case ? Then only it will work

Anonymous
Not applicable

@amitchandak thanks for quick response.

I have all in one table, so I need to split columns and generate some id column to be used to connect splitted ones. Not sure if this will have impact on performence of dashboard. I will try.

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.