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

Formula question

Started by Zara, 01 Jun 2009 06:49:06 AM

Previous topic - Next topic

Zara

Hi, I have two objects [Hour] and [Day].
How I make formula which returns data only from mon - fri 17 pm - 8 am and totally saturdays and sundays?

Mohan11

In cognos report studio vendor specific functions, we have a function called 'day of week' using this function you will get your desired data.

Gopinath

If you want 2 different totals for a measure value, create 2 data items


[Data item1] for Sat - Sun
Total( if ([Day] in (1,7)) then ([Measure]) else (0) )

[Data item2] for Mon - Fri
Total( if ([Day] Not in (1,7) AND [Hour] Between Starttime AND Endtime) then ([Measure]) else (0))

Zara

Hi,

I need only one total sum. I didnt get those exaples to work.

Do you have examples how that day of week -function work? I have not use it earlier. 

Thanks for your replies.

blom0344

_day_of_week is not a vendor specific function. It is listed under the date/time functions as a Cognos function. The tip on the function explains very precisely how it should be used  ;)