Forum Discussion
sujitjena
Resolver I
5 years agohow to correct error: Function 'DATEADD' expects a contiguous selection when the date column comes..
Hi, I have a perfectly working model with a separate "Dates" table that is connected to fact table "CCR". The data was flowing well untill the source data (access file) was updated for current perio...
- 5 years ago
daxer-almighty : I have the periods selected in order i.e Jan and Feb. Anyway, i found the solution. It was with the relationship that was causing the issue. But thanks for your reply.
HotChilli
Community Champion
5 years agoI've not seen that error before but most DATEADD problems arise from a badly formed date table. What does the date table look like?
Can you also explain why the date table has a bi-directional relationship? This is unusual.
And this bit is confusing "Slicer selection = Year = 2021 (only one year is selected and multiple months are selected)."
sujitjena
Resolver I
5 years agoHotChilli : Thanks for your reply. My Date table is derived from the below formula:
Dates = VAR BaseCalendar =CALENDARAUTO(8) RETURN GENERATE(BaseCalendar, VAR BaseDate = [Date] VAR YearDate=YEAR(BaseDate) VAR MonthNumber = MONTH(BaseDate) RETURN ROW("Day",BaseDate, "Year", YearDate, "Month Number",MonthNumber, "Month", FORMAT(BaseDate,"MMMM"),"Year Month", FORMAT(BaseDate,"MMM YY")))
Fin Year = if(MONTH(Dates[Date])<=8, YEAR(Dates[Date]) ,YEAR(Dates[Date])+1)
Actually I dont have any bi-directional relationship.
When i say 1 year - i mean i have two slicers - One for the year and one for the months, I have selected Year=2021 and under Months = Sep to Feb are selected.
I got a feeling that Pbix file might be corrupted, because the slicer is stuck with old table and doesnt take anything that is applied for change.