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
olimilo
Responsive Resident
Responsive Resident

Filter an unrelated table using a switch?

I made a Switch table to use with the Filter vis with this structure:

 

Category Table

CategoryIndex
A1
B2
C3
D4
E5
F6

 

My dataset is structured in this way:

Profile Table

NameABCD
Gaufrid CashLeadLeadExpired 10/1/16 
Joachim WendelinTeamLead 5/18/2017
Wealhmær LeifLeadLead  
Goraidh AyberkLeadTeamExpired 10/5/1611/29/2007
Dene JonathanTeamTeam  
Wolfe GrantTeam  2/6/2016
Jake Steel Team 2/6/2016
Sean Cody Team 1/1/2012
William HigginsLeadTeam  
Gabriel TiberiusTeamTeam 5/29/2009

 

Is it possible to filter the Profile table when the user selects a Category from the Category table? If the user selects Category A, the Profile table would only show people whose either Team/Lead for Category A.

 

I tried using the following measure but I'm getting The expression refers to multiple columns error.

 

Selection = 
SWITCH(
    TRUE(),
    VALUES('Category'[Category]) = "A", FILTER('Profile', 'Profile'[A] <> BLANK())
)
1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @olimilo,

 

First, unpivot Profile Table structure under Query Editor mode. Select columns [A], [B], [C] and [D] at the same time and click the "Unpivot Column" option under Transform tab.

1.PNG

 

You will get a new dataset structure.

2.PNG

Return back to report view mode. Create a one to many relationship between Category table and Profile table based on common column [Category].

3.PNG

 

Then, insert a Matrix visual and a Slicer. Add 'Category'[Category] as slicer item, drag relative fields from Profile table into Matrix.

4.PNG5.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 @olimilo,

 

First, unpivot Profile Table structure under Query Editor mode. Select columns [A], [B], [C] and [D] at the same time and click the "Unpivot Column" option under Transform tab.

1.PNG

 

You will get a new dataset structure.

2.PNG

Return back to report view mode. Create a one to many relationship between Category table and Profile table based on common column [Category].

3.PNG

 

Then, insert a Matrix visual and a Slicer. Add 'Category'[Category] as slicer item, drag relative fields from Profile table into Matrix.

4.PNG5.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.