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: 
Carlaf_93
Creator II
Creator II

WEEK FUNCTION

Good morning,

i would like to create a week dimension by a date field.

I want to start the count of the week from the first day of january.... 01/01/2020.

What do i need to do?

week(DATE,1)   ?

1 Solution

Accepted Solutions
Kushal_Chawda

try below

If you want week year the try below

LunarWeekName(Date)

If you just want week number then try belo

=floor(Right(LunarWeekName(Date), 2))

View solution in original post

4 Replies
tresesco
MVP
MVP

Use second parameter to define broken week. Try like:

Week(Date, 0, 1)

Read week function in qlik 

Carlaf_93
Creator II
Creator II
Author

i would like to hav the number of the week.

from 1 to 7 january is first week,

from 8 to 14 is the second one... and so on...

Kushal_Chawda

try below

If you want week year the try below

LunarWeekName(Date)

If you just want week number then try belo

=floor(Right(LunarWeekName(Date), 2))

Carlaf_93
Creator II
Creator II
Author

Question: Why some weeks are set with 8 days?

I expect to have 7 days....