Forum Discussion

Analitika's avatar
Analitika
Post Prodigy
5 years ago

Function 'DATEADD' expects a contiguous selection when the date column comes from a table on the 1-s

I have table

 

 

Calendar table

relations

 

 

Mesures

_YTD = CALCULATE ( [_Y], DATESYTD ( 'Calendar'[Date] ) )
_YTD, LY = CALCULATE ( [_YTD], DATEADD ( 'Calendar'[Date],-1,YEAR ) )
 
 Third graph have 
When i select one year it work ok
 
But if select more than one year i got error
 
Error Message:
MdxScript(Model) (8, 47) Calculation error in measure 'tbl_PL'[_YTD, LY]: Function 'DATEADD' expects a contiguous selection when the date column comes from a table on the 1-side of a bi-directional relationship.