Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi all i have dates from today to future upto 2022, i want to write a master calander on future dates

Hi all, i have dates from today to future up to 2022, i want to write a master calender on future dates. i want date, weekhistory and monthhistory

1 Solution

Accepted Solutions
Digvijay_Singh

Check this out -

Made below changes in script to get the week count against week history -

join(My_Table)

Load Future_date,weekhistory resident MasterCalendar;

Final:

Load *,if(len(weekhistory)>0,rangesum(No_of_people_attended,Peek(No_of_people_attended),Peek(No_of_people_attended,-2),

  Peek(No_of_people_attended,-3),Peek(No_of_people_attended,-4),Peek(No_of_people_attended,-5),Peek(No_of_people_attended,-6)),null()) as RollingWeek

resident My_Table order by Future_date,weekhistory;

Drop fields Week,weekhistory from Final;

Drop table  My_Table;

View solution in original post

24 Replies
Digvijay_Singh

See the attached.

Not applicable
Author

Hi, Digvijay thank you for the help, i was struck at another point

if(weekday(TempDate)='Sun',date(TempDate),if(date(floor(num(TempDate)))=

$(vmaxdate),null()))   as weekhistory,

i'm calculating week history i couldn't get the exact results

Regards

QLIKMAN

Digvijay_Singh

correct the variable name, its vMaxDate.

Digvijay_Singh

Not sure the reason for new column weekhistory but your expression will work once you correct the variable name.

Not applicable
Author


i have given the correct variable but still its working but couldnt get the data matched

jonathandienst
Partner - Champion III
Partner - Champion III

Please explain what you are trying to achieve with this column.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

count of 'XXXX' at the end of a week, i  have created a master calender for future dates upto 2020,
i'm counting the count of 'xxxx' for the next 15 days, in the same way i want the count in the next 2 weeks weekwise

Digvijay_Singh

Can you share your script and the output required in table form. It will help to understand exact need.

Not applicable
Author

future_date     no of updates

2-10-2015       1

3-10-2015       15

4-10-2015       4

5-10-2015       6

..............

..............

.............

3-10-2022

i have writtenn a master calender for this dates my mastercalender 'date' is working fine

i want to calculate a field called 'week history' which shows sunday as the end of week

suppose 4-10-2015 is sunday i want to calculate the count of that week ie the count is (2-1-2015 + 3-10-2015)= 16

weekhistory     count

4-10-2015        16

as i have written a script for the weekhistory in the above converstion its not working fine its missing some dates