Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Week number

hello all,

Request you to please help me with below scenario :-

In my Data , i have Date field which has data commencing from 2018. From This date i created week numbers:-

Week(Date_Test) as Week_test

For a particular selection i get the below data :-

Aspiring_Developer_0-1630652975887.png

 

Here my Date range is August 2,2021  to August ,8 , 2021  which is ideally week number 31.

Aspiring_Developer_1-1630653109560.png

 

However in my case it is coming week number 32. My week numbers are not coming in correct order. 

I don't know how to proceed with as i am stuck. Can anyone please help me ?

 

Thanks in advance.

1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi 

week functin get some parameters to control the result as fisrtdayofweek, brokenweek 

see below :

if you put 0 as brokenweek ( second parameters ) it's give you Week 31 , putting 1 as brokenweeks parameters will give 32 

brunobertels_0-1630657170416.png

 

in your case you should write 

Week(Date_Test,0,0) as Week_test

 

chek also that main variable for brokenweek is set to 0 

 

SET BrokenWeeks=0;

see help menu :

https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunc... 

hope it helps

View solution in original post

1 Reply
brunobertels
Master
Master

Hi 

week functin get some parameters to control the result as fisrtdayofweek, brokenweek 

see below :

if you put 0 as brokenweek ( second parameters ) it's give you Week 31 , putting 1 as brokenweeks parameters will give 32 

brunobertels_0-1630657170416.png

 

in your case you should write 

Week(Date_Test,0,0) as Week_test

 

chek also that main variable for brokenweek is set to 0 

 

SET BrokenWeeks=0;

see help menu :

https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunc... 

hope it helps