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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bstark1287
Helper II
Helper II

Need to sum year to date by creation date and delivery date

Because there are multiple dates within the table I must use the USERELATIONSHIP dax. Here is what I have: 

 

Total by Create date = CALCULATE([OE],
DATESYTD(
USERELATIONSHIP('Calendar'[Date], Sheet2[CREATE_DATE])))
 
Note: OE= sum of order qty
1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi there!

I would be like this:

CALCULATE(
    [OE]
    DATESYTD( 'Calendar'[Date] ),
    USERELATIONSHIP( 'Calendar'[Date], Sheet2[CREATE_DATE] )
)

Let me know if that helps!

View solution in original post

3 REPLIES 3
PabloDeheza
Solution Sage
Solution Sage

Hi there!

I would be like this:

CALCULATE(
    [OE]
    DATESYTD( 'Calendar'[Date] ),
    USERELATIONSHIP( 'Calendar'[Date], Sheet2[CREATE_DATE] )
)

Let me know if that helps!

That did it, thank you! How could I enter USERELATIONSHIP in this DAX? 

CALCULATE(
    SUM('Sheet2'[ORDER_QTY]),
    FILTER(
        ALLSELECTED('Calendar'[Date]),
        ISONORAFTER('Calendar'[Date], MAX('Calendar'[Date]), DESC)
    )
)

Just add it as another argument of your calculate expression, as it will enable the indicated relationship for the duration of the calculation. Should be like this:

CALCULATE (
    SUM ( 'Sheet2'[ORDER_QTY] ),
    FILTER (
        ALLSELECTED ( 'Calendar'[Date] ),
        ISONORAFTER ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), DESC )
    ),
    USERELATIONSHIP ( 'Calendar'[Date], Sheet2[CREATE_DATE] )
)

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors