Forum Discussion
amalekshahi
8 years agoFrequent Visitor
Multi-column relationship in Direct Query
Hi, I have two tables in Redshift that I want to connect to using Direct Query, model the data and use it in Power BI. The tables are: Program: AccountID int ProgramID int Program...
v-yulgu-msft
8 years agoMicrosoft Employee
Hi amalekshahi,
From my opinion, the better choice is to add a calculated column "AccountID" & "ProgramID" to each table. Then, you can establish relationship between this new column. Why do you mind formatting this new column with string type? This is just a related column, but you can still make calculation based on original numeric fileds.
Regards,
Yuliana Gu
amalekshahi
8 years agoFrequent Visitor
Hi v-yulgu-msft
I am just concerned about the performance in Power BI, converting int to string and then concatenating them to create relationship seems to be a lot of overhead.
- v-yulgu-msft8 years agoMicrosoft Employee
Hi amalekshahi,
What is your data source type? If using SQL Server Database, another way is to merge table via SQL query. If using Analysis Service, you can merge tables via MDX.
Best regards,
Yuliana Gu