Forum Discussion
Table connection
- Anonymous1 year ago
It seems I solved the problem, there is a solution which seems like to work (this is anonymised and sample):
Combined_Data = UNION( SELECTCOLUMNS('Table1', "Year", 'Table1'[Year], "Question1", 'Table1'[Question1], "Question3", 'Table1'[Question3], "Customer Loyalty", 'Table1'[Readiness to recommend]), SELECTCOLUMNS('Table2', "Year", 'Table2'[Year], "Question1", 'Table2'[Question1], "Question3", 'Table2'[Question3], "Customer Loyalty", 'Table2'[Readiness to recommend]) )
So I made a new table that includes the column I need from both tables. Do you think there can be some problems or limitations with this solution / way? Or does it looks like a decent or good workaround?
I think this doesn't work, if there are different amount of rows and columns? If 2022 there are 500 rows and 30 questions and 2023 400 rows and 25 questions.
Hello Anonymous ,
You can use Partition by to generate sequesnce for each questions which can than be used to join irrespective of number of rows.
Alternatively you can merge both the tables simply
1. Merge both the table based on "Question".
2. select "Question" as join column and choose appropriate join type. Click ok
3. Expand table to include columns you want
I hope this helps.
Cheers
Neeraj Kumar
https://www.linkedin.com/in/neeraj-kumar-62246b26/
- Anonymous1 year agoNot applicable
Thank you! Really appreciate it. But I don't have one "Question" column which has all questions, I have a lot of columns like "Question X (where X is 1, 2, 3, 4, ..., x)". So it doesn't answer fully on this situations, does it? Sorry if I understand you wrong 😄
Thank you in advance