Forum Discussion
Filter with value from another table
- 1 year ago
Hey stefantaust ,
Hi Stefan! You’re on the right track by wanting to filter one table based on a value from another. Since your tables aren't related and you want to apply a dynamic filter, here's how to solve it depending on the tool you're using. Below are approaches for Power BI and DAX, which is a common scenario for this type of problem.
Problem Summary
You have:
Table 1 with a slicer applied → only 1 value remains (e.g., a threshold).
Table 2 that you want to filter dynamically to show rows where value <= threshold from Table 1.
There is no relationship between Table 1 and Table 2.
Solution Using DAX (Disconnected Tables)
Create a Measure to Extract the Slicer Value
SelectedValueFromTable1 = SELECTEDVALUE('Table1'[YourColumn])Create a Measure to Filter Table 2
You cannot directly filter a table visual using a column expression like that, but you can use a measure to achieve it.ShowValue = VAR threshold = [SelectedValueFromTable1] RETURN IF(MAX('Table2'[YourValueColumn]) <= threshold, 1, 0)Apply Visual-Level Filter
Add the ShowValue measure to your visual.
Set a filter on it: ShowValue = 1.
This will dynamically show only the rows in Table 2 where values are less than or equal to the selected slicer value from Table 1.
When Using Power Query
If you are in Power Query (instead of visuals or measures), it’s trickier because dynamic interaction via slicers isn’t available. You'd need to:
Pull the selected value into a parameter.
Reference that parameter to filter the other table. But this won’t be interactive like slicers in reports.
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Hello pankajnamekar25
thank you for your solution.
i changed:
Auswahl_SOMA =
MAX('SOMA Profile'[Status (Start)])ShowFlag =
VAR SelectedVal = MAX([Auswahl_SOMA])
RETURN
IF(MAX(Checkpoints[Status]) <= SelectedVal, 1, 0)but i have an Error
German: Die Funktion "MAX" akzeptiert als Argument Nr. 1 nur einen Spaltenverweis.
English: The "MAX" function accepts only a column reference as argument no. 1.