Forum Discussion
Date tables - Sage 200
Hi I need somehelp with my date table.
I have a live dataset that has been integrated from Sage 200, however I am having a major issue with my date table. It is pulling all the way from 1818 instead of 2018. The dat range that I want it to pull from is 'Invoice Credit Line View'[sop_invoice_credit_document_date]. Its not allowing me to use that as the date table as it says that there are not consecutive dates.
10 Replies
- lbendlinSuper User
Your fact table seems to contain a "May 14 1818" date. So that's what the calendar wants to use. Problem is that the Windows calendar only starts on December 30 1899. Hence your gap.
Note: Read about COALESCE , it can simplify your code quite a bit.
Dates = CALENDAR(MAX(earliestdate,"1900-01-01"),COALESCE(latestdate,TODAY()))
- Chris2BHelper I
Sorry I am not understanding? I have tried adding a closing parenthesis but I still am getting errors. I sipossible to help me rewrite it.
Thanks
- lbendlinSuper User
CALENDAR(MAX(earliestdate,"1900-01-01"),COALESCE(latestdate,TODAY()))
- Chris2BHelper I
I have tried using Chat GPT to amend the Max values and I have gotten a new error message: