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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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