Forum Discussion
Connect columns from two separate data sources
Hello,
I have two separate data tables that I am trying to connect a column from each one so that I can filter on the data and it will control both tables. On the Claims Audit table, there is a column called Group Name and on the Claims SLA table, there is a column called Employer Name. I want to connect these two columns into one.
On past dashboards, I simpy created a third table called Clients and populated that with a client list. This was done outside of Power BI on an Excel spreadsheet. I then imported that sheet into Power BI and them made my connection to each separate data source via that sheet. For some reason that is not working any more. And I would rather not do that because I would have to keep manually updating that main client list to keep it current.
So how can I merge - append or join just the two columns "Group Name" and "Employer Name" from the two individual data sources??? Please help!
Hi domc23,
But I still cannot make any releationships between the newly created table and the original data source tables. I am getting the "You can't create a releationship between these two columns because one of the columns must have a unique values"!
How can I get around this error. If I can get past this, I think I am home free.
Based on my test, you should be able to use the [Group Name] (instead of [Group Number])column to make relationships between the newly created table and the original data source tables in your scenario. :smileyhappy:
Regards
9 Replies
- v-ljerr-msftMicrosoft Employee
Hi domc23,
Could you post your table structures with some sample/mock data and the expected result, so that we can better assist on this issue? :smileyhappy:
Regards
- domc23Helper I
Here is a very raw example of what I am trying to do. Combine or Append just the columns Employer Name and Group Name from the two separate tables. There will be duplicates on each list which is preventing me from linking the two data sources. Please excuse the way I posted these. I do not know how to get them side by side. I hope this makes some sense on what I am trying to accomplisy. Any help is greatly appreciated.
Table 1 Group Number Group Name 1 ROTARY INTERNATIONAL 2 KOBELT TRAVEL INC. 3 TRANSFORMER MANUFACT. INC. 4 LYONS FARRPORT MARKET 5 PETER TROOST MONUMENT 6 ITOFCA, INC. 7 NORTRAN 8 PARKER BROTHERS 9 BALESTRA'S 10 RAY KOONTZ 11 MITCHELL MILLER IGA Table 2 Group Number Employer Name 2 KOBELT TRAVEL INC. 5 PETER TROOST MONUMENT 8 PARKER BROTHERS 9 BALESTRA'S 11 MITCHELL MILLER IGA 13 CHICAGO GEAR WORKS 22 KNOX COUNTY EMPLOYEES 44 FLEMING/SLC DIVISION 91 VILLA SCALABRINI HOME 101 SCRIVNER/BUFFALO DIVISION 211 ANDERSON SHUMAKER COMPANY 37 MATHIEU IMPORTS Desired Results Group Number Group Name or Client Name 1 ROTARY INTERNATIONAL 2 KOBELT TRAVEL INC. 3 TRANSFORMER MANUFACT. INC. 4 LYONS FARRPORT MARKET 5 PETER TROOST MONUMENT 6 ITOFCA, INC. 7 NORTRAN 8 PARKER BROTHERS 9 BALESTRA'S 10 RAY KOONTZ 11 MITCHELL MILLER IGA 2 KOBELT TRAVEL INC. 5 PETER TROOST MONUMENT 8 PARKER BROTHERS 9 BALESTRA'S 11 MITCHELL MILLER IGA 13 CHICAGO GEAR WORKS 22 KNOX COUNTY EMPLOYEES 44 FLEMING/SLC DIVISION 91 VILLA SCALABRINI HOME 101 SCRIVNER/BUFFALO DIVISION 211 ANDERSON SHUMAKER COMPANY 37 MATHIEU IMPORTS - v-ljerr-msftMicrosoft Employee
Hi domc23,
Based on my test, you should be able to use the formula below to create a new table to get the expected result in your scenario. :smileyhappy:
Table = DISTINCT ( UNION ( SELECTCOLUMNS ( Table1, "Group Number", Table1[Group Number], "Group Name", Table1[Group Name] ), SELECTCOLUMNS ( Table2, "Group Number", Table2[Group Number], "Group Name", Table2[Employer Name] ) ) )Regards