Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
Consider I have this following code in the edit script.
Let vDay = Num(today());
LOAD
RowNo() as Sno,
Date($(vDay) -RowNo() +1 ) as Day,
num(Rand() * 1000, ' #,##0.00' ) as Amount
AutoGenerate 365;
What I want in this code is a week number for each date based on month and year
Like for example
Sno,Day,Amount, WeeknoMonthly, weeknumberyearly
125,24-03-2016, 205, 4,14
Hope I am clear.
Thanks
Kiran Kumar
I think for WeekNumberYearly you can try the Week() function. Not really sure what you can do for WeekNoMonthly
For week number monthly, try something like
Autonumber( Week(Day), MonthName(Day) )
Hi sunny,
=Week(Date#('06-01-2016','DD-MM-YYYY')) is giving 1 , just curious to know
when I use first day of this year, 01-01-2016 my system is giving 53. can you elaborate on this.
Thanks
Kiran Kumar
Check this link out:
UPDATE: Set BrokenWeeks=1;
This will make Jan 1st as Week 1
Or for older versions
QlikView by default is using ISO week numbering, as mentioned in Henric's blog post.
Sunny,
I tried with the following after setting the BrokenWeeks to 1 ,
=Week(Date#('01-01-2016','DD-MM-YYYY'))
but still getting 53.
thanks
kiran
I think you need also
Set ReferenceDay=1;
Thanks all for your advises will come back shortly