Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
yogitamehta10
Creator
Creator

To calculate to current week and last week

Hi  Team,

Could you please help me reagrding , i have two types of date in my data , one is planned date,created week  and other is completed date Planned date : future date when job is planned.

created date: when job is created ib system.

Completed date : date when job will be completed.

i have to calculate   total job planned this week and last week.

Planned date can be a future date  of  nect month and year.

Count({<[Work Stream]={'O'},[Current job status]={'Install Planned','Appointment Completed'},

plaaned date={">=$(=Weekstart(Max(planned date)))<=$(=Weekend(Max(plaaned date)))"}>}

JOB_number)

I'm using this expression but this is not giving me correct result.

Could you suggest m i using the right calculation.

6 Replies
sunny_talwar

May be you need to add Date() function

Count({<[Work Stream]={'O'},[Current job status]={'Install Planned','Appointment Completed'},

plaaned date={">=$(=Date(Weekstart(Max(planned date)), 'DateFieldFormatHere'))<=$(=Date(Weekend(Max(plaaned date)), 'DateFieldFormatHere'))"}>} JOB_number)


Dates in Set Analysis


yogitamehta10
Creator
Creator
Author

Hi sunny,

#but i want current week and last week only  and one more thing if i will use planned date

=$(=Date(Weekstart(Max(planned date)), '


then it wll give me future date  not current week date

sunny_talwar

May be replace Max(planned date) with Today()

Count({<[Work Stream]={'O'},[Current job status]={'Install Planned','Appointment Completed'},

plaaned date={">=$(=Date(WeekStart(Today(), -1), 'DateFieldFormatHere'))<=$(=Date(Weekend(Today()), 'DateFieldFormatHere'))"}>} JOB_number)

yogitamehta10
Creator
Creator
Author

i dont want today  i want if got the data till last week monday so i want that monday to be maximum date.

sunny_talwar

This can fasten up if you can provide a sample with your expected output

Not applicable

Did you perhaps spell planned wrong