NATURALINNERJOIN Function (DAX)

How does the NATURALINNERJOIN function (DAX) work?

The NATURALINNERJOIN function (DAX) performs an inner join of a table with another table. The 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.

NATURALINNERJOIN Formula Syntax

NATURALINNERJOIN (
     <leftJoinTable>, <rightJoinTable>
)

How do you use the NATURALINNERJOIN function?

The join condition of NATURALINNERJOIN is automatically defined by the columns having the same name and type in the two tables. You use this function when you do not have a relationship in the data model between two tables, and you can join the result of table functions.

Related Blog Posts

Related Support Forum Posts

Using InnerJoin
Joining Two Calculated Tables
New Table using DAX or M? Or only by Query Edit?

Considerations when using the NATURALINNERJOIN function

  • There is no sort order guarantee for the results.
  • Columns being joined on must have the same data type in both tables.
  • Only columns from the same source table are joined on.
  • Strict comparison semantics are used during join. There is no type coercion.

Related Video Tutorials

Formula examples using the NATURALINNERJOIN function

= SUMX (NATURALINNERJOIN (Salesperson,Sales),[Sales Amount])

= NATURALINNERJOIN(cte;cte2)

= ADDCOLUMNS( NATURALINNERJOIN( ‘Table 1’, SUMMARIZE( ‘Table 2’, ‘Table 2′[closing balance] )

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.