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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
wbart
Helper I
Helper I

filter by groups defined in tables

Hello,

I try to simply filter my data by several predifined groups. The data is stored in a table and every group is stored in a seperate table. I maybe missed it, but is there a simple way to select these groups as a filter with one click on and of in a report? 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @wbart 

 

You need to define which item belongs to which group first in the table. Then you can create a relationship between the data table and group table on item columns. In this way you can use the group column in a slicer or filter or something else to filter the data table. The filter influence is passed by the relationship between tables. This is the easiest way.

050603.jpg

 

Reference: Model relationships in Power BI Desktop - Power BI | Microsoft Docs

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @wbart 

 

You need to define which item belongs to which group first in the table. Then you can create a relationship between the data table and group table on item columns. In this way you can use the group column in a slicer or filter or something else to filter the data table. The filter influence is passed by the relationship between tables. This is the easiest way.

050603.jpg

 

Reference: Model relationships in Power BI Desktop - Power BI | Microsoft Docs

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Thanks v-jingzhang, in the case that the names belong to more than one group I run into trouble I think. Am I right?

Hi @wbart 

I'm not sure what's your data like. You could try modifying the relationship to having many-to-many cardinality with single (Group table filters Data table) direction. In my sample, it works. For example, if I define "name a" belongs to group1 and group2, “name a” will show when I select either group1 or group2 in a slicer.

050705.jpg

Regards,

Jing

Hi Jing,

Yes it works. I shy away a bit from the many to many relationship and for imense size of the Group table. 

I solved the problem for myself by using site Filter and show group results in one page of the report switching between with bookmarks. Thank you very much.

Best regards

 

Wbart

amitchandak
Super User
Super User

@wbart ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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