Skip to content

Trying to fix incorrectly described behavior regarding NATURALINNERJOIN()#426

Open
fterrani wants to merge 1 commit into
MicrosoftDocs:mainfrom
fterrani:patch-2
Open

Trying to fix incorrectly described behavior regarding NATURALINNERJOIN()#426
fterrani wants to merge 1 commit into
MicrosoftDocs:mainfrom
fterrani:patch-2

Conversation

@fterrani

@fterrani fterrani commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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 as NATURALLEFTOUTERJOIN() (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 as RELATED(), RELATEDTABLE() and LOOKUPVALUE() might be worth considering (according to Copilot).

@prmerger-automator

Copy link
Copy Markdown
Contributor

@fterrani : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 22e0c4b:

✅ Validation status: passed

File Status Preview URL Details
query-languages/dax/naturalinnerjoin-function-dax.md ✅Succeeded

For more details, please refer to the build report.

@kgremban

kgremban commented Jul 9, 2026

Copy link
Copy Markdown
Member

@KayUnkroth @minghan thoughts?

@KayUnkroth KayUnkroth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fterrani

Copy link
Copy Markdown
Contributor Author

@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?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@v-dirichards

Copy link
Copy Markdown
Contributor

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants