Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!!
I have three fields: Year, Month, Week (of the month, 1-5) and am trying to use Qliks week and date functions to produce the Wednesday date of each week. The approach I have taken works for most cases, but for some reason the week() function in qlik is not always producing the week number I am expecting.
For example, for 2021, September, Week 1, I would expect September 1st, but Qlik is booting the date back one week to September 8th. This is because the Week() function returns week #36 for date 9/1/2021, even though this is the 35th week (/wednesday) of the year (see https://calcudater.com/wednesdays-in-2021). I have tried using the various arguments available for MakeDate, Week, and MakeWeekDate, but nothing is fixing this problem. Please Help!!!!!!!
date expression: MakeWeekDate(PricingYear, Week(MakeDate(PricingYear, PricingMonth), 2) + PricingWeek-1, 2)
(2=wednesday)
Example Table: (first column is a concatenation of the year/month/week values)
Great question! I'm not sure.
Maybe BrokenWeeks=0 would show your expected results?
Thank you for your response! Unfortunately, changing the broken weeks value has no effect on the result.
it is because of your week definition: "Week(MakeDate(PricingYear, PricingMonth), 2)"
You say to qlik that the week should start on wednesdays. Set this to 0(monday) or 6(sunday), depending what is the official weekstart in your region.