Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Fortnight function

Is any fortnight function available like Week,Day etc.

4 Replies

Re: Fortnight function

No but you could try something like

     round ( week ( today() ) / 2 )

anbu1984
Honored Contributor III

Re: Fortnight function

=Date( today()+14 ) --Fortnight date

=Week( today()+14 ) --Fortnight week

Re: Fortnight function

Hi,

Check this.

Regards

ASHFAQ

Re: Fortnight function

Hi,

maybe one solution could be:

QlikCommunity_Message_140471_Pic1.JPG.jpg

SET Fortnight = Ceil(Week($1)/2);

SET FortnightName = Dual(WeekYear($1)&'/'&Num(Ceil(Week($1)/2),'00'),MakeWeekDate(WeekYear($1),Ceil(Week($1)/2)*2-1));

SET Quarter = Dual('Q'&Ceil(Month($1)/3),Ceil(Month($1)/3));

tabCalendar:

LOAD *,

    Day(Date) as Day,

    WeekDay(Date) as WeekDay,

    Week(Date) as Week,

    WeekName(Date) as WeekName,

    $(Fortnight(Date)) as Fortnight,

    $(FortnightName(Date)) as FortnightName,

    Month(Date) as Month,

    MonthName(Date) as MonthName,

    $(Quarter(Date)) as Quarter,

    QuarterName(Date) as QuarterName,

    Year(Date) as Year,

    WeekYear(Date) as WeekYear;

LOAD Date(MakeDate(2012)+IterNo()-1) as Date

AutoGenerate 1

While MakeDate(2012)+IterNo()-1<=Today();

hope this helps

regards

Marco

Community Browser