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?
In cognos report studio vendor specific functions, we have a function called 'day of week' using this function you will get your desired data.
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))
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.
_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 ;)