Forum Discussion
restrict the data in a filter visual from one table with data present only in another table
I have a dimension table containing all the states present in my Power BI, and in other tables I have different states. I would like to use the state column of the dimension table to create a visual filter but by restricting the data visible in the filter to the data present in my second table. Can I put a measure that would allow me to do this?
Use State filter with 8 states but when i use the filter i only see A,C,D,E,F.
THANKS.
- Anonymous2 years ago
Hi psorel ,
Are you referring to using [ID] data from another table to affect the [ID] in the dimension table as a slicer
Here are the steps you can follow:
1. Create measure.
Flag = var _select=SELECTCOLUMNS('Table1',"id",'Table1'[ID]) return IF( MAX('dimension table'[ID]) in _select,1,0)2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
3 Replies
- PijushRoy
Community Champion
Hi psorel
Please create a relationship with State between both table with both way filter
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin - AnonymousNot applicable
Hi psorel ,
Are you referring to using [ID] data from another table to affect the [ID] in the dimension table as a slicer
Here are the steps you can follow:
1. Create measure.
Flag = var _select=SELECTCOLUMNS('Table1',"id",'Table1'[ID]) return IF( MAX('dimension table'[ID]) in _select,1,0)2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly