If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Calculate difference between dates use only working days

Started by mbianka, 12 Nov 2018 07:05:02 AM

Previous topic - Next topic

mbianka

Hello.

I want to calculate difference between dates. The running-different function would be OK, but this use every day. I need just working days. (The working days can be found in WORKPERIOD table)

The running-different function do this:
running-difference ( julian_day( [DATE] ) for [ID])

ID                Date          Difference    Difference I need
1234          2018-10-24        0                 0
1234          2018-10-25        1                 1
1234          2018-10-29        4                 2 , because 10-27, 10-28 is non-working day
1234          2018-10-31        2                 2


Could someone help me how ,,filtered non-working day" in calculation?

Thank you.

(Cognos 10.2 Report Studio)

Invisi

How are these working days stored in this table? Maybe you can do a count of some sort where the working days are in a date range. When a working day is represented with a flag or Boolean column, maybe you can count those.
Few can be done on Cognos | RTFM for those who ask basic questions...

khabaleshri

You can use  _day_of_week(Date,1) not in (6,7) in filter and then do diffence calculation