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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.