Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

SUM MTD Not working through DateTable

Hi,

LeadCount MTD = 
CALCULATE(SUM(fLeads[LeadCount]), DATESMTD(dDate[Date])) is not working
But if I do directly LeadCount MTD = 
CALCULATE(SUM(fLeads[LeadCount]), DATESMTD(fLeads[DATE_KEY_LEAD])) it works fine.
 
Same thing if I try using:
TOTALMTD(SUM(fLeads[LeadCount]), dDate[Date]) is not working.
TOTALMTD(SUM(fLeads[LeadCount]), fLeads[DATE_KEY_LEAD]) is working fine.

Another measure works fine if I use my Datetable.
Yesterday =CALCULATE( SUM(fLeads[LeadCount]), dDate[Date] = TODAY()-1)
 
I am going mental over here - What am I doing wrong? 

The relationsship must be setup correctly if one measure is working fine. 

Looking forward to your help.
 

 

11 Replies