My Traffic WoW field works in the visual, but once I add the weeknumber field, it doesn’t populate for some reason? I have been trying to debug but haven’t found the issue, but for some reason, the Traffic YoY still works?
Not working when adding weeknumber
Working without weeknumber
Datefield (calculated field) -
ifelse(
${Periodstarting}='Day', truncDate("DD", {hit_day_loc}),
ifelse(${Periodstarting}='Month', truncDate("MM", {hit_day_loc}),
ifelse(${Periodstarting}='Week', addDateTime(6, "DD", truncDate("WK", {hit_day_loc})),
truncDate("YYYY", {hit_day_loc})
)
)
)
weeknumber (calculated field)
ifelse(
${Periodstarting} = 'Week',
weeknum(Datefield),
NULL
)
Traffic WoW (calculated field)
ifelse(
${Periodstarting} = 'Week',
periodOverPeriodPercentDifference(
sum(traffic),
Datefield,
WEEK,
1
),
NULL
)
Traffic YoY (calculated field)
ifelse(
${Periodstarting} = 'Week',
periodOverPeriodPercentDifference(sum(traffic), Datefield, WEEK, 52),
ifelse(
${Periodstarting} = 'Month',
periodOverPeriodPercentDifference(sum(traffic), Datefield, YEAR, 1),
ifelse(
${Periodstarting} = 'Year',
periodOverPeriodPercentDifference(sum(traffic), Datefield, YEAR, 1),
NULL
)
)
)


