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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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