Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Data Modeling Question

Hello, I need advice with a data modeling problem. Below you may find 3 screenshots and attached PBIX file.

 

Link to Download PBIX file

 

Screenshots below show:

  1. What my report looks like
  2. The problem I am experiencing
  3. My current data model

This data model contains several linking tables for many-to-many relationship between Recommendations table and different geography levels tables (State, County, City). I know that some relationships need to be changed in order to fix this problem but I'm not sure which ones.

 

Screenshot 1 - What my report looks like:

 

p

 

Screenshot 2 - The problem I am experiencing:

 

 

p

 

Screenshot 3 - My current data model:

 

p

 

Thank you!

  • Anonymous's avatar
    Anonymous
    5 years ago

    I was able to figure out this problem on my own. In order to take care of hierarchy between geographical dimension tables (State/County/City) all I had to do was to create Location table with nullable Foreign Keys. See below screenshot.

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for looking into this. 

       

      I have tried your proposed solution but it breaks cross filtering across other visuals. See below screenshot.

       

      Can you please elaborate on how you propose to change the data model. I am afraid I don't fully understand your previous explanation. I need to keep cross-filter both directions for State > County > City relationships.

       

      Also I assumed state_recscounty_recs and city_recs are already considered fact tables since they contain foreign keys from recommendations and states/counties/cities respectively.

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    I was able to figure out this problem on my own. In order to take care of hierarchy between geographical dimension tables (State/County/City) all I had to do was to create Location table with nullable Foreign Keys. See below screenshot.