Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to get a Count measure working that would count the distinct Unique refs for the max year/week that is currently in the system, however when i type in my expression, it's taking the correct year but not the correct week.
week(Date_request) should return Week 12 for 2020
Appreciate some feedback.
Cheers,
count({$<week_request={"$(=max(year(date_request))&'/'&max(week(date_request)))"}>} distinct(Unique_search_ref))
Does this solve your issue?
count({$<week_request={"$(=max(year(date_request))&'/'&week(max(date_request)))"}>} distinct(Unique_search_ref))
I switched place between week () and max ().
Does this solve your issue?
count({$<week_request={"$(=max(year(date_request))&'/'&week(max(date_request)))"}>} distinct(Unique_search_ref))
I switched place between week () and max ().
Hi guys
Just my 2 cents... when faced with questions regarding weeks and years I often use the weekname function. I don't see it used often, but I find it super useful.
Regards,
Mauritz
You could also consider using weekyear over week to handle correct year around new years.
I second your 2 cents @Mauritz_SA , but make sure that the field used for comparing is also formated as WeekName.