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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression - not in

I have got a problem with expression where I would like to sum some data  but only on working days:

sum(if ((NetWorkDays(MonthStart(Today()),Today()-1) = dzienRoboczyRejestrWniosku and (Num(Month(today()))=miesiacRejestrWniosku) and (dataRejestracjiWniosku=('*') - (Date('2014-08-15','YYYY-MM-DD'), Date('2014-11-01','YYYY-MM-DD'), Date('2014-11-11','YYYY-MM-DD'), Date('2014-12-25','YYYY-MM-DD'),

Date('2014-12-26','YYYY-MM-DD'), Date('2015-01-01','YYYY-MM-DD'),Date('2015-01-06','YYYY-MM-DD'),

Date('2015-04-05','YYYY-MM-DD'), Date('2015-05-06','YYYY-MM-DD'),Date('2015-05-01','YYYY-MM-DD'),

Date('2015-05-03','YYYY-MM-DD'), Date('2015-05-24','YYYY-MM-DD'),Date('2015-06-04','YYYY-MM-DD'),

Date('2015-08-15','YYYY-MM-DD'), Date('2015-11-01','YYYY-MM-DD'),Date('2015-11-11','YYYY-MM-DD'),

Date('2015-12-25','YYYY-MM-DD'),Date('2015-12-26','YYYY-MM-DD'))), kwotaWnioskowana, 0)))

But it doesn't work. Could anybody sugest me where is a problem ?

1 Solution

Accepted Solutions
datanibbler
Champion
Champion

Hi,

do you have a master_calendar? If so, you could just calculate a binary field for working_days in there and make a set_expression out of it.

Regarding your scenarios - you are subtracting all the public holidays, it seems:

Networkdays returns just a number, so it's no good for distinguishing working_days and holidays.

I would suggest building a >> NOT(MATCH(Date, [list_of_holidays])) << condition in there - since your commands are in a language I don't know, however, it's a bit hard to say.

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try the same changing the starting sum with rangesum

let me know

datanibbler
Champion
Champion

Hi,

do you have a master_calendar? If so, you could just calculate a binary field for working_days in there and make a set_expression out of it.

Regarding your scenarios - you are subtracting all the public holidays, it seems:

Networkdays returns just a number, so it's no good for distinguishing working_days and holidays.

I would suggest building a >> NOT(MATCH(Date, [list_of_holidays])) << condition in there - since your commands are in a language I don't know, however, it's a bit hard to say.

Not applicable
Author

Thanks Data Nibbler. It works.