Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
psorel
Helper I
Helper I

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.

 

 

 

psorel_0-1709288647913.png

psorel_1-1709288654496.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

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.

vyangliumsft_0-1709520447744.png

3. Result:

vyangliumsft_1-1709520447747.png

 

 

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

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

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.

vyangliumsft_0-1709520447744.png

3. Result:

vyangliumsft_1-1709520447747.png

 

 

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

psorel
Helper I
Helper I

hi @PijushRoy , 
I have an error message telling me that the filter path between the tables of a data model is authorized. and I need to disable relationships between tables. I use the dimension  table for several tables using the same column as relation field.

PijushRoy
Super User
Super User

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.