Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ?
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.
Try the same changing the starting sum with rangesum
let me know
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.
Thanks Data Nibbler. It works.