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
Lily36876
Helper II
Helper II

How to do like SQL JOIN in dax

Hi I have two table data model like pic below,

I want to create a column at left table ,count by [ShopNo] and Gds[QtyTot] from right table ,

meaning for A shop Product A have Owe 3qty for customer 

(red column is what i'm asking)

 

how can I do? Thanks A lot!!!!

Lily36876_1-1661006133177.png

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Lily36876 

please try

OweQty =
SUMX (
    FILTER (
        'Owe Orders',
        'Owe Orders'[ShopNo] = EARLIER ( 'Sho Inventory'[ShopNo] )
            && 'Owe Orders'[GdsNO] = EARLIER ( 'Sho Inventory'[GdsNO] )
    ),
    'Owe Orders'[QtyTot]
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Lily36876 

please try

OweQty =
SUMX (
    FILTER (
        'Owe Orders',
        'Owe Orders'[ShopNo] = EARLIER ( 'Sho Inventory'[ShopNo] )
            && 'Owe Orders'[GdsNO] = EARLIER ( 'Sho Inventory'[GdsNO] )
    ),
    'Owe Orders'[QtyTot]
)

Hi Thanks For your Reply,I think I got success!!!

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.