Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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:
data_model_question_1.jpg

 

p

 

Screenshot 2 - The problem I am experiencing:

data_model_question_2.jpg

 

 

p

 

Screenshot 3 - My current data model:

data_model_question_4.jpg

 

p

 

Thank you!

1 ACCEPTED SOLUTION
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.

data_model_question_6.jpg

View solution in original post

3 REPLIES 3
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.

data_model_question_6.jpg

amitchandak
Super User
Super User

@Anonymous , I removed some bi-directional relations. But this model needs changes. recommandation will merge with State_rec , country_rec and City_rec and create three fact recommandation_State_rec  , recommandation_country_rec

City_rec_recommandatio. They will not join with each other 

 

Screenshot 2020-11-06 11.14.49.png

 

https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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.

 

data_model_question_5.jpg

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.