Forum

Question about Mult...
 
Notifications
Clear all

Question about Multiple Relationships

3 Posts
2 Users
0 Reactions
47 Views
(@sugrue)
Posts: 6
Active Member
Topic starter
 

Mynda,

In the Superstore Models, you have a relationship between Orders and Dates based on the Order Date.  What if you wanted to do some analysis based on Ship Date within the same model?  Is the relationship automatically there between Ship Date and the Dates table just based on the fact that the 2 tables are already related using Order Date?

 
Posted : 28/09/2017 3:56 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Jack,

Great question! You need to create a second relationship between the Ship Date column and the Dates table. This relationship will be inactive because you can only have one active relationship at a time.

You then write a measure with CALCULATE and use USERELATIONSHIP as one of the filter criteria to specify which date relationship to use. It's explained in detail here: http://www.sqlbi.com/articles/userelationship-in-calculated-columns/

Mynda

 
Posted : 28/09/2017 8:15 pm
(@sugrue)
Posts: 6
Active Member
Topic starter
 

Thanks, Mynda.  That's great info!

 
Posted : 29/09/2017 9:16 am
Share: