Forum Discussion
SUM MTD Not working through DateTable
Anonymous ,
seems like type mismatch with data tabel and fLeads[DATE_KEY_LEAD],
make sure fLeads[DATE_KEY_LEAD] is type of date.
Hi Anonymous
Seems like it is, right?
- Anonymous6 years agoNot applicable
Anonymous ,
Seems like not 🙂
- Anonymous6 years agoNot applicable
Anonymous
Why not?
The field is stated as a date and the Yesterday function is working fine.
Could you please explain what am I missing?- Anonymous6 years agoNot applicable
Anonymous ,
You have define your types correctly,
as a cheeky solution you can use the same formula as in Yeaterday - 1 (as it works).
Instead of giving static value (2) in the formule
dDate[Date] = Today() - 2
you can use a variables to calculate the number of days in the month and pass it to there.
So your LeadCountMTD would be
VAR Var1 = Count Number of MTD
CALCULATE(
SUM(fLeads[LeadCount),dDate[Date] = TODAY() - Var1
)
I have being sarcastic 🙂