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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
lylererger
Creator II
Creator II

Count of Days in а Week

Hi.

Business speaks that there is a condition of selection of outlets on flags. It means that in a week of this period and same week of a previous period (last year) the outlet shall work.They put down 1 or 0 in line with date and an outlet.

Look like "Like for Like" or "WCY vs WLY" in script.

My task to count quantity flag="1" in a week. Logically possible to count number of days in a week and if when comparing number of flags with "1" in week and number of days in week then I put down quantity of flags 1 or 0 depending on hit in a condition of this point.

But I got stuck on it would seem simple moment - to count number of days in a week. Why upon transition since a year for a year of week move down...?

week.png

Thnx.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think the issue is that you should use

weekyear(Date)  as [Год],

insetad of

Year(Date)as [Год],

since QV uses ISO week numbering.

View solution in original post

2 Replies
swuehl
MVP
MVP

I think the issue is that you should use

weekyear(Date)  as [Год],

insetad of

Year(Date)as [Год],

since QV uses ISO week numbering.

Colin-Albert
Partner - Champion
Partner - Champion

Henric Cronström has a useful discussion of week numbers in his blog which may help.

http://community.qlik.com/blogs/qlikviewdesignblog/2014/01/27/week-numbers