Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE:MonthEnd

Hi All,

Settu Periyasamy

hic

adam davies

Sunny Talwar

Marco Wedel

i am facing one issue regarding week and month

i have  fields like   week number    1 to  52    and  months  december,january,February

so issue is  :  in january2017  we have 5 weeks.  but i need     to display 4 weeks only  means

my week start is : Monday

so by below pic

25,26,27,28,29,30,31------   should be december 2016 week 4

29,30,31,1,2,3,4, ------------------- should be in week1 of feb

calender.JPG

15 Replies
anjali0108
Partner - Creator III
Partner - Creator III

Hi.

Please use the below code and tell me if it works:

First in edit script:

write:

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun;'

SET FirstWeekDay=0;

then write the below script in ur code:

Common:

load *,

MonthName(CommonDate)  & '- Week' & ' ' & WeekNumberInMonth as WeekNoAndMonth_MonthlyReports;

load *,

MonthName(MakeWeekDate(Year(CommonDate), week(CommonDate))) & '- Week' & ' ' & WeekNumberInMonth as WeekNoAndMonth_WeeklyReports;


load *,

if((week(CommonDate) - week(monthstart(CommonDate)) + 1)<1,1,(week(CommonDate) - week(monthstart(CommonDate)) + 1)) as WeekNumberInMonth;

LOAD *,

MakeDate(CommonYear,CommonMonth,CommonDays) as CommonDate

FROM

$(AppQvdPath)Common.qvd

(qvd);

after this use

dimension as: WeekNoAndMonth_MonthlyReports ..your weeks will start forming from monday ....

please revert if it wrks

Chanty4u
MVP
MVP
Author

while loading your script below error it showing ?error.PNG

ahaahaaha
Partner - Master
Partner - Master

Я получил все хорошие (прикрепленный файл)

Chanty4u
MVP
MVP
Author

но я не имею лицензии он possble, чтобы отправить его в QVF? (Qliksense)

rahulpawarb
Specialist III
Specialist III

Hello Chanty,

Trust that you are doing great!

Load statement which is throwing an error is expecting input date in Number format. If you pass the date in number format then error with reload will be eliminated.

Please correct me if I misunderstood.

Regards!

Rahul

ahaahaaha
Partner - Master
Partner - Master

You showed a picture Qlik Sense. Version Qlik Sense Desktop can open other people's files.

Opening an app in Qlik Sense Desktop ‒ Qlik Sense

I usually just drag the file QVF to your desktop Qlik Sense (attached file).