Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
YBavré
Frequent Visitor

NATURALINNERJOIN

Hi, I have created two tables:

_Table_SE_Only = CALCULATETABLE(VALUES(ENHANCED_CKI_CUSTOMER[Enterprise_Nbr]), filter(ENHANCED_CKI_CUSTOMER,ENHANCED_CKI_CUSTOMER[Cust_Segm] = {"Independent"}))
and
_Table_ORG_Only = CALCULATETABLE(VALUES(ENHANCED_CKI_CUSTOMER[Enterprise_Nbr]), FILTER(ENHANCED_CKI_CUSTOMER,ENHANCED_CKI_CUSTOMER[Cust_Segm] IN {"IVSE", "VSE", "SME", "Mid-Market", "Large Enter"}))
So I now have two tables with 1 column, being "Enterprise_Nbr" in both tables
 
I want to count the number of common "Enterprise_Nbr" from both tables.
So I used 
Common = NATURALINNERJOIN(_Table_SE_Only, _Table_ORG_Only)
But I get the error message NATURALINNERJOIN requires at least one common join column
 
I don't understand what I'm doing wrong. Can anyone help? Thanks.

Or is there another way to get the result I need?

3 REPLIES 3
v-jialluo-msft
Community Support
Community Support

Hi YBavré,

 

Can you provide sample data, providing sample data can solve the issue faster.

 

Best Regards,

Gallen Luo

v-jialluo-msft
Community Support
Community Support

Hi @YBavré ,

 

NATURALINNERJOIN DAX Function:Joins the Left table with right table using the Inner Join semantics.

vjialluomsft_0-1669860290622.png

 

Based on your description, I think you can use the union function and then use the count function to count each row in the table:

Common = UNION(_Table_SE_Only, _Table_ORG_Only)

Count = CALCULATE(COUNT('Common '[Enterprise_Nbr]),FILTER(ALL('Common '), 'Common '[Enterprise_Nbr]= MAX('Common '[Enterprise_Nbr])))

 

NATURALINNERJOIN - Microsoft Power BI Community

 

 

Best Regards,

Gallen Luo

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, thank you for your reply.

Unfortunatelly it doens't function the count measure returns 1 as result, not the total count.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors