Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm a newbie to qliksense. I have a requirement where I need to create week number fields per month as W1,WE,WE,W4 OR W5.
Please find the screenshot of the requirement.
Hi @KundanJyothsna, if you have a Date field you can assign the week as:
If(Day(MonthEnd(DateField))>=30 and Day(DateField)>21
,'W4'
,'W'&Ceil(Day(DateField)/7))
Hi @rubenmarin
Thanks for your reply,
I have applied your code with my requirements which is as below
if(Day(MonthEnd(BUDAT_MKPF))>30 and Day(BUDAT_MKPF)>28, 'WK5') as WeekNo,
if(Day(MonthEnd(BUDAT_MKPF))=30,if(Day(BUDAT_MKPF)>21, 'WK4',
'WK'& Ceil(Day(TempDate)/7))) as WeekNo,
Where I'm unable to get WeekNumber Correctly for few dates.Please find the screnshot for the same
My requirement is as below
Month with 28(ex: FEB )should show only upto weeks upto W4 i.e from 22-28 as W4
Month with 30 days(Ex: APR) should show only upto weeks upto W4i .e from 22-30 as W4
Month with 31 days(Ex: Mar) should show only upto weeks upto W5 i .e from 22-28 as W4 and from
29-31 as W5.
Can you please look into it and do the needful
Thanks in Advance
Jyothsna Kundan
Hi @KundanJyothsna it should be
=If(Day(MonthEnd(DateField))<=30 and Day(DateField)>21
,'W4'
,'W'&Ceil(Day(DateField)/7))
Thanks alot @rubenmarin . It's resolved.