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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors