Forum Discussion

aicms's avatar
aicms
Frequent Visitor
5 years ago
Solved

Create groups with repeated products and use as slicer

Hi all,

 

I have a list of products and would like to create two groups, with one of the products (Product A) belonging to both groups, and then create a slicer of the "Groups" and select on Group to analyse at a time.

When I connect it to my dim_Product table, it appears an error mentioning that I cannot have a repeated product in "Products".

How can I make this work?

 

Table:

ProductsGroups
Product AGroup A
Product BGroup A
Product CGroup A
Product AGroup B
Product DGroup B

 

Thank you!

Adriana

  • You should be able to use that table you show as an example directly in your model, and then make a relationship from your Products column to the Product column in the other table(s).  If you make a slicer on the Group column, the Product A will be included in the filter to the related table for both Groups.

    Pat

2 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    You should be able to use that table you show as an example directly in your model, and then make a relationship from your Products column to the Product column in the other table(s).  If you make a slicer on the Group column, the Product A will be included in the filter to the related table for both Groups.

    Pat

    • aicms's avatar
      aicms
      Frequent Visitor

      I had that impression but for some reason it didn't work.. but after you mentioned it, I deactivated the automatic relationship between tables and made it manually, so the problem disappeared 🙂

      Thank you!!