Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The following code snippet is auto-generated for date fields:
[autoCalendar]:
DECLARE FIELD DEFINITION Tagged ('$date')
FIELDS
...
Dual('W'&Num(Week($1),00), Num(Week($1),00)) AS [Week] Tagged ('$weeknumber', '$cyclic'),
...
(WeekStart(Today())-WeekStart($1))/7 AS [WeeksAgo] ,
Week(Today())-Week($1) AS [WeekRelNo] ;
However, the results do not make sense. How can Week (=W01) be consistent and Weeks ago jump from 60 to 112? Is there documentation that explains what is happening here?
Yes. I see that. Thank you.
Your conclusion is correct and I was able to easily fix it--although you did have, what I believe, is an honest mistake, "...two calendar years, 2019 and 2019..." should be 2019 and 2020.
Please let me know where I can find documentation on variables, functions, keywords used in the data load editor.
Hi @aaron
The data is consistent, you missed a property in the data, causing your confusion, by looking at you screenshot:
You are mixing Res Week between two calendar years, 2019 and 2019; the field Res Week the week number within the transaction's year, so obviously the weeks ago for the first week of the previous year is about 112 weeks, and these fields are calculated from today's date, I build a similar application here, getting the results shown below:
As you can see, the figures on those fields are off by 1 compared with your screenshot, except for the Res Week, which is the week number for the transaction's year.
Hope this helps,
Yes. I see that. Thank you.
Your conclusion is correct and I was able to easily fix it--although you did have, what I believe, is an honest mistake, "...two calendar years, 2019 and 2019..." should be 2019 and 2020.
Please let me know where I can find documentation on variables, functions, keywords used in the data load editor.