Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Create calendar in qliksense

Hi All,

I have to create a calendar to generate weeks from my date. 

The week start should be saturday and weekend should be sunday.

For instance for the month of march :-

5th march - saturday (week start)

6 th march - sunday (weekend)

And we have to follow 52 weeks pattern for the year.

Can anyone please help me , how can i generate it using my date field ?

 

Thanks in advance

Labels (1)
5 Replies
Or
MVP
MVP

The Week() function takes parameters for both which day is the first of the week, whether broken weeks should be allowed, and which day defines the first week of the year. You should be able to combine these to get what you want, hopefully. If you can't, you can always define your dates and week numbers in an external file (e.g. Excel) and load those in your script.

Aspiring_Developer
Creator III
Creator III
Author

Hello @Or 

Thanks for your response.

I want to do it using external file and use index number but I don't know how to do it 😕

Or
MVP
MVP

I don't know what 'index number' means in this context...

The file would have a structure of e.g.

Date, Week

01/01/2022, 1

02/01/2022, 1

03/01/2022,2

ad infinitum. You would join this to whatever date field you want.

Aspiring_Developer
Creator III
Creator III
Author

Hi @Or 

But I have the data for 5 years, so that means i will have to manually input all the dates for last 5 years in excel and do markings for week start and week end .

Is there any other way out for this ?

 

Thanks in advance

Or
MVP
MVP

You could use the Week() function with its parameters if you can make that fit your requirement. Since your requirement isn't clear to me, I can't suggest the specific syntax.