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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Daryn
Creator
Creator

Count, but count differently for one specific week

Hi folks,

Looking for your help/guidance once again if possible, with this little nugget of a brain melt for me!

 

I have a chart showing % of orders shipped on time.

Daryn_0-1682421862782.png

 

 

Daryn_1-1682421862790.png

 

 

The dimension is a rolling 12 month view;

=IF (([ERDAT.autoCalendar.Date]) >= (AddMonths (today(),-11)) , Date#([ERDAT.autoCalendar.Month]))

 

The three measures are the same except for the <, >, or = making them early, on time or late.

COUNT ({< [WADAT] = {"<=$(=Date(Today()))"}, [VBELN] = {"= [WADAT_IST] < [WADAT] "}>}  [VBELN] ) / COUNT ([VBELN])

// = Early

 

WADAT = Planned goods issue date

WADAT_IST = Actual goods issue

VBELN = Document

 

 

Great, now I get a curve ball thrown to me, the factory wants an extra ordinary shut down period.

Monday May 29th 2023 to Friday June 2nd 2023    (Wk 22)

During which period all planned delivers (WADAT) will need to be pushed back, ie + 7 days.

I could change the whole lot using;

COUNT ({< [WADAT] = {"<=$(=Date(Today()))"}, [VBELN] = {"= [WADAT_IST] < [WADAT] +7 "}>}  [VBELN] ) / COUNT ([VBELN])

 

But I only want to change the week (wk 22) mentioned, and still show everything else normally.

I tried to do something with WeekStart, but couldn’t get it to work.

 

Any help/guidance or solution appreciated, if it an be done?

Regards,

Daryn

Labels (1)
3 Replies
Qrishna
Master
Master

As i dont have any data to work on, i could possibly only give you ballpark idea.

try creating weeknumber field in script and do something like this:

if(weeknumber = x, '', your_expression) //Where x is your shutdown weeknumber

 

Hope that helps. Happy Qliking.

Daryn
Creator
Creator
Author

Hi and thanks for reading ad responding. I have attached some sample data, if that helps. Again thank you for your time.

Regards, Daryn

Daryn
Creator
Creator
Author

Still hoping someone may have a solution please?

Thanks in advance.

Daryn