Forum Discussion

chris_cjg's avatar
chris_cjg
New Member
1 year ago
Solved

Modelling with multiple fact tables at different aggregations

I'm refininig a rather complex model but I'm running into issues with bidirectional filtering trying to model the below.   dim_industry contains one value perstate, dim_state contains one value per...
  • tharunkumarRTK's avatar
    tharunkumarRTK
    1 year ago

    dim_industry contains one value perstate, dim_state contains one value per salesperson (and multiple for state), dim_salesperson contains one value per salesperson (and multiple for customers). 

     

    The above info that you have shared is a bit unclear to me, I believe you might have a dim_state dimension table which contains one unique record (row) representing each state. If yes then you should ideally create a relation from this table to fact_one and fact_two to build the insight that you want to create i.e "Sate wise actual and Projected Sales". 

     

    Since that is not the case, I would like to suggest you an option which will avoid the ambigous relation path error 

    1. Create the relationship between dim_state and fact_one, this willl get you the "State wise actual sales"

    2. Instead of creating a relationship from dim_state to fact (which is not possible), create a meausre in this way

    ProjectedSales = Calculate(Sum(fact_two[Projected sales]), Treatas(Values(dim_state[sales Person]), fact_two[sales person]))

    treatas can pass the sales person values of each state to fact_two and can retrieve the projected sales values corresponds to them. 

     

     

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!