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 ) )
)- Midway1 year ago
Helper I
hey there, thanks for replying to my post. I tried this formula but it's giving an error, "unexpected parameter , dt". If I remove runs fine but still does not work. Still no sales without selecting any data points.