Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

cacosta35
Contributor II

Week Number Based on Current Week

Hello!

I hope someone can help me on this...  My objective is to get the weeknumber based on current week until week 52..  IF More than week 52, it  will be flagged as  '52+'.   However, based on  my formula below, the week counter continues even when there is a gap on the MonDate.  Pls. see below my desired output.

If([Monday for Date] < weekstart(today(1)),0,

          If([Monday for Date] = weekstart(today(1)),1,

           If([Monday for Date]<> weekstart(Peek([Monday for Date])),rangesum(peek([Week Number]),1),Peek([Week Number])))) as [Week Number]

This is my desired output :

1.  slips the week number if there is a gap

2.  Flagged week no to 52+ if weej number is more than  52.

Thank you in advance !

1 Reply
Highlighted
kalyanivintha1
Contributor II

Re: Week Number Based on Current Week

Try this Requirement by creating ageing buckets on week number field.