Forum Discussion

Midway's avatar
Midway
Icon for Helper I rankHelper I
1 year ago
Solved

help with DAX MTD

Hi there,  I'm really struggling with this calculation with this DAX measure; What I need to accomplish is show let's sales numbers in a card. When a month is selected in another visual (like a time...
  • Deku's avatar
    Deku
    1 year ago

    var dt = eomonth( MAXX( summarize( fact, DimDate[Date] ), dimdate[date]), 0)

    return

    CALCULATE(

        SUM(Fact[SALES]),

        DATESBETWEEN( DimDate[Date], EOMONTH( dt, -1) + 1, dt )

    )