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
PBI_newuser
Post Prodigy
Post Prodigy

How to create a common slicer for 2 fact tables

Hi,

I have 2 fact tables "Resource Availability" and "Work Order".

I would like to have common slicer for "Region" and "Product Line".

But, after I created the relationship for "Product Line" with the dimension table "Dim_ProductMapping", I can't create the relationship for "Region" with the dimension table "Dim_Region".

Please help.

PBI_newuser_0-1611913512632.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Follow these guidelines:

  1. Ensure you have only unique entries (no blanks at all) in the Region column of the Dim_region table
  2. Ensure you have only unique entries (no blanks at all) in the Product Line column of the Dim_ProductMapping table
  3. Build a Many to One relationship (With Single cardinality) from the Region column of the Resource Availability table to the Region column of the Dim_Region table
  4. Build a Many to One relationship (With Single cardinality) from the Region column of the Work Order table to the Region column of the Dim_Region table
  5. Build a Many to One relationship (With Single cardinality) from the Product Line column of the Resource Availability table to the Product Line column of the Dim_ProductMapping table
  6. Build a Many to One relationship (With Single cardinality) from the Product Line column of the Work Order table to the Product Line column of the Dim_ProductMapping table

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @PBI_newuser , have you tried the suggestions in other replies? It should work and then you can use the column in Dim table for your slicer.

Hi @v-jingzhang , it works. I have accepted one of them as solution. Thanks everyone!

parry2k
Super User
Super User

@PBI_newuser @lbendlin is right on track, make sure product line is a unique column, currently looks like it is not because it has many to many relationships.

 

What @Ashish_Mathur explained is good but not to confuse you already have one to many relationships with the dim_region table and no change required there.

 

In nutshell, just focus on the product mapping table and ask yourself if the product line is the right column to have a relationship. Logically it should be on the product.

 

Good luck! You are in safe hands with @lbendlin 

 

Cheers!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Ashish_Mathur
Super User
Super User

Hi,

Follow these guidelines:

  1. Ensure you have only unique entries (no blanks at all) in the Region column of the Dim_region table
  2. Ensure you have only unique entries (no blanks at all) in the Product Line column of the Dim_ProductMapping table
  3. Build a Many to One relationship (With Single cardinality) from the Region column of the Resource Availability table to the Region column of the Dim_Region table
  4. Build a Many to One relationship (With Single cardinality) from the Region column of the Work Order table to the Region column of the Dim_Region table
  5. Build a Many to One relationship (With Single cardinality) from the Product Line column of the Resource Availability table to the Product Line column of the Dim_ProductMapping table
  6. Build a Many to One relationship (With Single cardinality) from the Product Line column of the Work Order table to the Product Line column of the Dim_ProductMapping table

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Your DimProductMapping dimension table is incorrect.  Dimension tables need to have a unique key (in your case Product Line).  Correct that issue (clean up the duplicates) and then correct the search filter to be unidirectional from dimension to fact. After that everything else will work ok.

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.