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
Orion
New Member

Slicers based on a fact table A can filter data of another fact table B ?

Hye,

 

I am wondering about one question concerning the filters and the slicer.

 

I have 2 fact tables "Fruit" and "Supplier". The slicer is based on the fact table "Fruit" and I want that the selections (multiple or single) done in the slicer must impact also the fact table "Supplier".

I think it is possible only with the DAX function but I do not know how to do ? Can you help me?

 

Thank you.

 

There is a sample :

aaaaai.PNG

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

@Orion

 

Try creating a new table with year and Month columns and related to both fact tables.




Lima - Peru

View solution in original post

Hi @Orion,

 

As Vvelarde's point of view, create a calendar table based on these tables' date filed,for example:

 

DateTable = CALENDAR(MIN(VALUES(Table1[Date]),VALUES(Table2[Date])),MAX(VALUES(Table1[Date]),VALUES(Table2[Date])))


Then create the relationship between datetable and above tables, use the date field which in the calendar table as the source of slicer.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

So, if there is no relationship between your two tables, how do you propose having the filter affect an unrelated table? Are you saying that if you select a Fruit for year 2001, month 2 that you only want to show Suppliers from that year and month? If that is the case, combine your Year and Month fields in both tables into a new field and then create a relationship between them. I'll test to see if it works if that is what you are wanting to do.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

thank you for your answer.

So, if there is no relationship between your two tables, how do you propose having the filter affect an unrelated table? Are you saying that if you select a Fruit for year 2001, month 2 that you only want to show Suppliers from that year and month?

YES

If that is the case, combine your Year and Month fields in both tables into a new field and then create a relationship between them. I'll test to see if it works if that is what you are wanting to do.

my case is more complicated I tried ti simplify in my sample.

I cannot created relation between the two fact tables because there are n:n cardinality.

 

 

Hi @Orion,

 

As Vvelarde's point of view, create a calendar table based on these tables' date filed,for example:

 

DateTable = CALENDAR(MIN(VALUES(Table1[Date]),VALUES(Table2[Date])),MAX(VALUES(Table1[Date]),VALUES(Table2[Date])))


Then create the relationship between datetable and above tables, use the date field which in the calendar table as the source of slicer.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you for your response

Vvelarde
Community Champion
Community Champion

@Orion

 

Try creating a new table with year and Month columns and related to both fact tables.




Lima - Peru

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.