MicrosoftDocs / powerbi-docs

Creative Commons Attribution 4.0 International
444 stars 844 forks source link

Modification needed for text about multiple-column joins #2563

Closed erapade closed 2 years ago

erapade commented 3 years ago

You say: Avoid relationships on calculated columns. This guidance is relevant to databases where you need to do multi-column joins. Power BI today doesn't allow a relationship to be based on multiple columns as the FK/PK. The common workaround is to concatenate the columns together using a calculated column, and base the join on that column. While this workaround is reasonable for imported data, for DirectQuery, it results in a join on an expression. That result commonly prevents use of any indexes, and leads to poor performance. The only workaround is to actually materialize the multiple columns into a single column in the underlying database.

As I understand, Multi-column joins are still possible if they are done using none loading queries. So we can setup a query doing multi-column joins at the schematic Power Query level. Please let me know if you don't agree, as I find the wording "The only workaround is to actually materialize the multiple columns into a single column in the underlying database" not suggesting this would be possible


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

KesemSharabi commented 3 years ago

Thanks for your comment, @erapade.

I've assigned this issue to the doc author for review.

davidiseminger commented 2 years ago

Thanks for the doc idea, and for the comment. We'll consider adding this to the documentation.