Forum Discussion
table filtered with a slicer
- Anonymous2 years ago
Hi JavierCM ,hello lbendlin,thank you for your prompt reply!
For your requirements, please create a measure as shown below:FilteredRows = VAR SelectedMinWeek = MIN('series'[weeknum]) VAR SelectedMaxWeek = MAX('series'[weeknum]) RETURN CALCULATE( COUNTROWS(relationships), FILTER( relationships, relationships[start week] <= SelectedMaxWeek && (ISBLANK(relationships[end week]) || relationships[end week] >= SelectedMinWeek) ) )Then filter the table use the measure like this:
This allows us to dynamically filter the table with slicer values according to the desired logic:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Did you join the tables in the data model? (Hint: you shouldn't)
Thank you for your interest.
No. I want to selec a numbre and filter the table with this number, and thats all.
I know to use the command filter, but how can use with a variable and use a dynamic filtered table. It's possible?
- lbendlin2 years ago
Super User
Yes. What have you tried and where are you stuck?
- JavierCM2 years agoFrequent Visitor
I'm trying to filter a table that establishes relationships between two data points in two columns. The table also has a column indicating the week when the relationship starts and another column for when it ends. I need to filter this relationship table based on the week selected in a data slicer. The goal is that when a specific week is selected, only the rows where the start week is earlier than the selected week and the end week is later remain visible.
I have tried various approaches, using FILTER directly, and also creating a measure to capture the selected week first... All of them fail, and all the rows keep appearing. I wonder if it's possible to filter tables dynamically.