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" )
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
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.
- stefantaust1 year agoHelper I
Hello, radio buttons aren't ideal. It would be better if I could filter using the blue list.
'Definition MM Data' [SOMA Profile]
I've created two prefiltered tables with only KAUF and only FERT:FilterStatus ZPCO_KAUF_01 = CALCULATETABLE('Prozess Schritte', 'Prozess Schritte'[ZPCO_KAUF_01]="ZPCO_KAUF_01") FilterStatus ZPCO_KAUF_01 = CALCULATETABLE('Prozess Schritte', 'Prozess Schritte'[ZPCO_KAUF_01]="ZPCO_FERT_01")
How can I solve it using the "blue" Visual filter, which only shows KAUF or FERT?- Elena_Kalina1 year agoSolution Sage
Then my solution doesn’t suit you. When I suggested creating two filtered tables, I meant two visuals using the same underlying table. This would allow simulating a slicer using bookmarks. Apparently, you need these tables not just for display purposes after all