Forum Discussion
Filter over 2 tables
- 1 year ago
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" )
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_Kalina1 year agoSolution 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
- stefantaust1 year agoHelper I
The idea of a pre-filtered table would be great.
Can you give me instructions on how to do that?
- Elena_Kalina1 year agoSolution Sage
Create two pre-filtered table versions (for "Only KAUF" and "Only FERT"), then follow the steps from the video to set up a toggle.
https://www.youtube.com/watch?v=5QMpc5fUV2I&t=97s
For your solution, you can also use radio buttons (like in the screenshots below) instead of a toggle.