This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is now in read-only for platform upgrade. Learn more
Our vendor system that we are using as a data source has several tables that use a combination primary key and for relationships to other tables you have to join on 3 or 4 columns (I hate it, I do not know WHY they do it...but it is the way it is).
Is there anyway to support that in Power BI Desktop using Direct Query?
In a Tabular data model I can make a calculated column to achieve this, however... it does not seem possible to do multiple column relationships in the modeling option for Direct Query Mode?
Solved! Go to Solution.
Hi @OneWithQuestion,
In Direct Query, you are still able to create a calculated column to combine multiple columns to generate the primary Key.
Col4 = Test5[Col1]&" "&Test5[Col2]
ColC = Test6[ColA]&" "&Test6[ColB]
Best regards,
Yuliana Gu
This is true and can be done, although is not very performant as the query is no longer hitting the actual column predicates for the join, right?
Agree. It is isn't practical to do it with large tables. The database ends up scanning the whole table to find the artificial keys it needs.
Hi @OneWithQuestion,
In Direct Query, you are still able to create a calculated column to combine multiple columns to generate the primary Key.
Col4 = Test5[Col1]&" "&Test5[Col2]
ColC = Test6[ColA]&" "&Test6[ColB]
Best regards,
Yuliana Gu
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 23 | |
| 22 | |
| 14 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 47 | |
| 36 | |
| 24 | |
| 20 | |
| 20 |