Forum Discussion
Filter over 2 tables
Hello, I have two tables that aren't linked to each other. In the first table (blue), the value is selected using a filter visual. All "CP IDs" should then be displayed where the filter condition is met. Only the result for the respective filter should be displayed. Thanks, Stefan
Hi stefantaust
I understand you want to filter the second table (Phase ID) based on selections in the first table (blue filter visual) without creating relationship between tables, am I right? Then try:
FilteredCPIDs = VAR SelectedCP = SELECTEDVALUE(FirstTable[CP ID]) RETURN IF( ISFILTERED(FirstTable[CP ID]), CONCATENATEX( FILTER('Phase ID', 'Phase ID'[CP ID] = SelectedCP), 'Phase ID'[CP ID], ", " ), "Select a CP ID" )
10 Replies
- Elena_Kalina
Solution Sage
Hi stefantaust
I understand you want to filter the second table (Phase ID) based on selections in the first table (blue filter visual) without creating relationship between tables, am I right? Then try:
FilteredCPIDs = VAR SelectedCP = SELECTEDVALUE(FirstTable[CP ID]) RETURN IF( ISFILTERED(FirstTable[CP ID]), CONCATENATEX( FILTER('Phase ID', 'Phase ID'[CP ID] = SelectedCP), 'Phase ID'[CP ID], ", " ), "Select a CP ID" ) - Rupak_bi
Super User
Hi stefantaust ,
if you really want the blue table as slicer, make an union table. That will solve the purpose.
- stefantaust
Helper I
Hello, thanks for the reply. I've created another example of what the result should look like.
Here are the names of the columns: Table 1: Blue Visual: 'Definition MM-Daten'[SOMA Profil] Table 2: Result: 'Prozess Schritte'[Phase ID] 'Prozess Schritte'[ZPCO_FERT_01] 'Prozess Schritte'[ZPCO_KAUF_01] 'Prozess Schritte'[CP ID]- Elena_Kalina
Solution Sage
Judging by your screenshot, you have a table, and you want to create a filter with the options "Only KAUF" and "Only FERT" for this table. When selecting "Only KAUF", the table should only show data for ZPCO_KAUF_01 (hiding the ZPCO_FERT_01 column and empty rows in ZPCO_KAUF_01). The same applies to "Only FERT".
Since you only need this for display purposes, why not make it simpler?
Here’s how:Create two pre-filtered tables (one for KAUF, one for FERT).
Add a toggle (e.g., buttons or slicer) to switch between them using Bookmarks.
This way, clicking a button will instantly show/hide the correct table—no complex DAX required
If this option suits you, I could write you instructions on how to do it
- stefantaust
Helper I
The idea of a pre-filtered table would be great.
Can you give me instructions on how to do that?
- AnonymousNot applicable
Hi stefantaust ,
Thank you for reaching out to the Microsoft Fabric Community, and we also appreciate the helpful insight already shared by Elena_Kalina .
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you. - AnonymousNot applicable
Hi stefantaust ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.