Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Dim Date Error

Hey Guys, Newbie here.

 I am trying to calculate YTD Sales using the following Formula:

 

Sales YTD = TOTALYTD([Sales], DimDate[CalendarDate].[Date])

   

Sales exists in a fact table and DimDate is a Date dimension . The two are related by datekey.

However when I try to plot the visual for YTD Sales, I get the following error:

MdxScript(Model) (6, 39) Calculation error in measure 'FactQBTransaction'[Sales YTD]: An invalid numeric representation of a date value was encountered

 

I checked the date table but everything seems fine

 

Can anyone help me with this?