Forum Discussion
Setting up my model
- Anonymous2 years ago
Hi magnusks
When setting up a data model in Power BI, make sure that you are correctly handling and associating dimension and fact tables.
Based on your description, you seem to be doing this correctly, but you are experiencing some issues when merging queries.
This could be due to a many-to-many relationship between different tables, or keys not being used correctly during the merge process.You may want to consider the following points:
Make sure that each dimension table has a unique primary key.
Use foreign keys in the fact table to refer to the dimension table's primary key. This way, you can associate the fact table with each dimension table through these foreign keys.
If you find duplicate rows after a merge query, this may mean that you need to rethink your key and relationship settings.
Use Power BI's Query Editor to clean and prepare data. You can use the Merge Query feature in the Query Editor to merge tables, but make sure the merge is based on the correct keys.
Consider creating bridged tables. If you have a many-to-many relationship, such as an employee who can work in more than one department, you may need to create a bridging table to solve this problem.Depending on your problem, you may need to create a bridge table with projects, activities, and departments so that you can associate these dimensions with the fact table without creating duplicate rows.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous,
Thank you very much for your reply. I will follow your tips and advice and see if there are anything I can do to improve my model.
Thanks again,
Magnus