Trying to fix incorrectly described behavior regarding NATURALINNERJOIN()#426
Trying to fix incorrectly described behavior regarding NATURALINNERJOIN()#426fterrani wants to merge 1 commit into
Conversation
|
@fterrani : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 22e0c4b: ✅ Validation status: passed
For more details, please refer to the build report. |
|
@KayUnkroth @minghan thoughts? |
KayUnkroth
left a comment
There was a problem hiding this comment.
Needs rewording -> Tables are joined based on an existing relationship existing between them in the model.
Simply say: Tables are joined based on existing relationships in the model.
|
@KayUnkroth It might seem obvious but I guess that if several relationships exist between the two tables, the active relationship is used? Also, what happens if we try joining tables entirely declared/generated in DAX? Copilot says that it's apparently impossible to define a relationship in DAX so that would make it impossible? |
There was a problem hiding this comment.
Pull request overview
This PR updates the documentation for NATURALINNERJOIN() to better describe how join columns are determined, aiming to correct behavior that may be inaccurately described today.
Changes:
- Updates the first bullet in Remarks to describe how
NATURALINNERJOIN()determines join behavior/requirements.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Remarks | ||
|
|
||
| - Tables are joined on common columns (by name) in the two tables. If the two tables have no common column names, an error is returned. | ||
| - Tables are joined based on an existing relationship existing between them in the model. For the join to work, the names of the columns used for the joining need to be distinct, otherwise an error is returned. |
|
#label:"aq-pr-triaged" |
I couldn't be more uncertain of what I'm suggesting to merge... I hate doing this but I'm resorting to Cunningham's Law so that the truth will manifest itself! 😅 I would have posted an issue in this repository if the section existed but apparently this isn't the case.
Documentation about
NATURALINNERJOIN()seems to be currently incorrect according to some of my tests and various posts online. If I'm correct about this, it might be worth checking descriptions of similar functions such asNATURALLEFTOUTERJOIN()(and others if any?).NATURALINNERJOIN()seems to have specific use cases so I think that describing those and adding short recommendations about potentially"cleaner" alternatives such asRELATED(),RELATEDTABLE()andLOOKUPVALUE()might be worth considering (according to Copilot).