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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Unable to create relationships in power bi

Hi guys,

 

I am trying to create relational model (star schema) in the power bi backend but some of the figures i am getting doesnt make sense. In my appendix table i have a raw data table and in particular i have a  Video Views (3sec) and Video Views (10sec) column which are not showing unique values by day. I think i have created a relational model which is wrong. 

 

Can someone help me in solving this issue? I have attached the power bi doc below for reference which has the relational table i have already built.

 

Test Data File

 

Thanks,

Suhayb

8 REPLIES 8
Tahreem24
Super User
Super User

Hi @Anonymous ,

 

Could you please share the number of tables and coulmn structure? because that PBIX file requires GA account login.

 

Thanks!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi,

 

Many thanks for your reply. I currently have 5 tables, in terms of column structure what do you mean?

 

I have attached a screenshot of my relational model view (hope that will help). Is there anything i can do on my end to give you access to the actual pbix file?

 

Screenshot

 

Thanks,

Suhayb

Hi @Anonymous ,

 

Yeah that screen shot helped. Can you please mentioned which type of relationship (one to many/many to many/many to one) you have selected for this star schema?

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi @Tahreem24 ,

 

They all seem to be set to many to many relationships but i believe thats incorrect (it doesn't let me change the relationships to anything else). I have connected the ad_id fields from each table but unsure if this is the right thing to do.

 

Thanks,

Suhayb

Hi @Anonymous,

 

This is what i was expecting i.e. many to many relation is not a recommended. 

It does force you to use M to M relationship because of some of the below reasons:

1. It may have duplicate records in ad-id column.

2. some records are matching with the your dimention tables.

 

If possible so please create some sample of excel file for all your 4 main dimention table so that i can duplicate this scenario at my end.

 

Thanks, 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi @Tahreem24 ,

 

Thanks for your input. I have attached my sample excel files of my main tables which are needed. Please send me your mock up once done. Appreciate the help!

 

FB_ADS

FBADS_CONVERSION

FBADS_GEO

FBADS_VIDEO

 

Thanks,

Suhayb

Hi @Anonymous,

 

I tried alot but not able to find any column key which has unique record/values across all 4 tables.

One alternative you can do is to append all 4 tables into one table using Query editor option.Follw the below ste for append query:

 

Step 1: Load all 4 csv files.

Step 2: Go to Edit Queries option -->Home --> Select any table(csv) for example (FB_videos) -->select  Append Queries --> Choose 3 or more table option --> and one by one add all remaing 3 csv --> click ok.

Step 3: Save and close.

Step 4: Check your values.

 

So, you don't need to create relationship between 4 tables as there are no unique records between them.

 

Please give KUDOS and Accept this as a SOLUTION if it helps you!

 

Thanks,

  

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Hi @Anonymous,

 

Please see the below screen shot. After applying append queries step FB_Videos becomes my master table which contain other remaining 3 table's data also so I hide all these 3 table(csv) as you can see in below screen shot:

 

Capture.JPG

 

Thanks! 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.