Discussion Board for collaboration on QlikView Scripting.
Please find attached the excel file.
I have DATE field. I need to create PERIOD and WEEK (52 weeks) dimensions. Can someone tell me the logic?
Can anyone help me please ?
I think you'd be best creating a basic calendar in your QV document. If you check the QlikView example docs loaded I think there is one there already, if not I'll dig out an example from here.
You basically build a calendar from a min to max date, for each date in that you define a week number:
WEEK(date) as WEEK
Then I would suggest an inline load (something like the below). Alternatively do the inline load before as a mapping load an map the period field into the calendar as you build it.
LOAD * INLINE [
I hope that helps.
Thanks for your reply.
Can you please elaborate it more.
week(date) as week….. will not work in my case.
Please see the attached file above..For every year, WEEK 1 is starting on First Monday of October.
How to create a dimension for week ?
Pls check the date format you are passing in week() function.it should be in following format
e.g week( '1971-10-30' ) returns 43.