Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am creating an application where I want to display all data on a weekly basis. So data is plot over WeekDays, Mon to Sun. What I am doing is based on selection date I find out the week start and end for that date. Now I want to plot data over this week.
The problem is that a week can extend from one month to another and same with the year. Hence I am struggling to get proper sum of my data.
As long as I am calculating sum for a unique day then everything is fine. But since dates are spread amongst different months and years within same week I can't get weekly data to display properly.
How would you solve this? A week can go from 30-12-2007 to 5-1-2008 how do you plot data over these dates?
Try using the Weekname() function.
This formats your date into a YYYY/WW format which considers the change between calendar year.
I.e.
Weekname(Date)
2007/51
2007/52
2008/01
2008/02
Try using the Weekname() function.
This formats your date into a YYYY/WW format which considers the change between calendar year.
I.e.
Weekname(Date)
2007/51
2007/52
2008/01
2008/02
Thank you. That's working great. I have a one more question, how do you find the year from the YYYY/WW value?
Found it. I used string function Left.
It's a bit tricky to understand how qlikview interprets data types.