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
ErPat
Frequent Visitor

Filtering results based on slicer value

I have a slightly different and weird data configuration.  I have two tables that are structured differently (shown in separate visuals on the same report) and needs to be filtered different using a single slicer as shown below:

 

Let's say that teams are grouped as follows:

Team A is a team on its own

Team B is composed of three teams as follows:  Team C, D, E


On Table 1, data is given for each team including separate data for Team B (which is composed of C, D and E) (ignore the "Data" column as those are just arbitrary values used for illustration)
Table1

Team NameData
A1
A2
B3
C4
D5
D4
E3
E2

 

On Table 2, data is only given for each team but not for Team B as follows:

Table 2

Team NameData
A2
A3
A4
C2
D3
E4
E5

 

I have a multi-select slicer that lists all Teams A, B, C, D, E.

My question is, if I select Team A, C, D and/or E, I need to display and filter as usual for both tables.  But if I select Team B, I need to display the Team B data (but not Teams C, D, E) from Table 1 and Teams C, D, E from Table 2.  I am guessing I would need a measure for Table 2 but can't figure out how to do it.  Please note that the slicer is also multi-select and there should be no duplication of data.

 

Basically, the slicer should work normally for Table 2 except when Team B is selected.  It should also account that a multi-select or "Select All" should ignore Team B for Table 2.

I know that the data is weird but I need to work with what I have.

2 REPLIES 2
amitchandak
Super User
Super User

@ErPat , Create a new column Table 2 and join that with common team dim, Also join table 1 with common team dim

 

New Team = Switch(True(),

[Team] in {"C", "D", "E"}, "B",

[Team]

)

 

Team Dim = distinct(union(Distinct(Table1[Team]), Distinct(Table2[Team])))

Thanks @amitchandak, I tried that solution earlier but it won't show anything if I select individual Teams, ie, C, D or E.  Also, I forgot to mention that there is another table relationship (Date) linked to both tables which prevents me to link both tables to the Team slicer table (would introduce ambiguity).

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.