Forum Discussion
Midway
Helper I
1 year agohelp 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...
- 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 )
)
Deku
Super User
1 year agovar dt = max( DimDate[Date] )
return
CALCULATE(
SUM(Fact[SALES]),
KEEPFILTERS( DATESBETWEEN( DimDate[Date], EOMONTH( dt, -1) + 1, dt ), dt ) )
)