Forum Discussion
Relationships
Hello,
I am just starting out in Power BI and would like your help on what is best practice regarding relationships.
So I have a headcount master spreadsheet that contains everone in the company from April - September.
I have been creating monthly filters and all seems to working well.
I want to add a Master Overtime Spreadsheet with everyone in the company that recieved Overtime Money from April - September and join the tables together.
Both spreadsheets contain the Employee ID.
When I try and joing the tables i get the unique error message.
So...I split the Overtime spreadsheet into 7 individual spreadsheets(April to Sept)
And BI worked out the relationships.
My question is when I click on slicer that has the headcount(month), how do I get it to show the same Month Overtime spend from that month's overtime table?
Thanks
Ross
hi, rosscortb
You'd better recreate the data model, you don't need to split the Overtime spreadsheet into 7 individual spreadsheets.
You could put them into one table or use a fact date table create the relationship with them.
If it is not your case, please share your sample pbix file or some data sample with data model and expected output . You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Best Regards,
Lin
3 Replies
- PattemManoharCommunity Champion
rosscortb You need to normalize you data model. Instead of having each table for each month, have a single table for all months and have a employee key as well as month key. Similarly, have a list of all employees in another table with employee key. It will be better to have a date dimension as well. You need to work out to have a proper data model (you might have got unique error message because when you link two tables atleast one table should have a unique values in the field you are using to link).
- rosscortbPost Patron
Ok, thanks for your quick response
- v-lili6-msftCommunity Support
hi, rosscortb
You'd better recreate the data model, you don't need to split the Overtime spreadsheet into 7 individual spreadsheets.
You could put them into one table or use a fact date table create the relationship with them.
If it is not your case, please share your sample pbix file or some data sample with data model and expected output . You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Best Regards,
Lin