Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In addition to message https://community.powerbi.com/t5/Desktop/Combine-same-tables-with-from-different-companies/m-p/19853... we have an issue / question.
In our situation we have 10 companies; but that shouldn't be a problem (I think).
Added a column in each (company)query (name query and company has to different - so far so good).
In our case the primary key of a table is YearWeek.
In the table itself this key is unique. However combined not (then there are 10 the same primary keys).
After applying the query changes I got of course the following message:
Column "YearWeek" in Table 001 contains a duplicate value "201601" and this is not allowed for columns on the one side of a many-to-one relationship or for coluns that are used as the primary key of a table.
What is the best way to add unique primary keys to each table or an other way to solve this ?
TIA for replying
Solved! Go to Solution.
@Nethunt wrote:
In addition to message https://community.powerbi.com/t5/Desktop/Combine-same-tables-with-from-different-companies/m-p/19853... we have an issue / question.
In our situation we have 10 companies; but that shouldn't be a problem (I think).
Added a column in each (company)query (name query and company has to different - so far so good).
In our case the primary key of a table is YearWeek.
In the table itself this key is unique. However combined not (then there are 10 the same primary keys).
After applying the query changes I got of course the following message:
Column "YearWeek" in Table 001 contains a duplicate value "201601" and this is not allowed for columns on the one side of a many-to-one relationship or for coluns that are used as the primary key of a table.
What is the best way to add unique primary keys to each table or an other way to solve this ?
TIA for replying
Roughly speaking, you can try to create a composite column like "company1_201601" and this column contains unique values in your case. What is the many table in this relationship? Usually a better practice is putting the '201601' in a calendar table which is connected to Table001 with the column dates.
@Nethunt wrote:
In addition to message https://community.powerbi.com/t5/Desktop/Combine-same-tables-with-from-different-companies/m-p/19853... we have an issue / question.
In our situation we have 10 companies; but that shouldn't be a problem (I think).
Added a column in each (company)query (name query and company has to different - so far so good).
In our case the primary key of a table is YearWeek.
In the table itself this key is unique. However combined not (then there are 10 the same primary keys).
After applying the query changes I got of course the following message:
Column "YearWeek" in Table 001 contains a duplicate value "201601" and this is not allowed for columns on the one side of a many-to-one relationship or for coluns that are used as the primary key of a table.
What is the best way to add unique primary keys to each table or an other way to solve this ?
TIA for replying
Roughly speaking, you can try to create a composite column like "company1_201601" and this column contains unique values in your case. What is the many table in this relationship? Usually a better practice is putting the '201601' in a calendar table which is connected to Table001 with the column dates.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |