COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Rosadocc on 30 Jul 2019 03:54:46 PM

Title: 2 Part Question: Filter Report for Business Day AND Adjust for local date
Post by: Rosadocc on 30 Jul 2019 03:54:46 PM
Hi,

I am brand new to using COGNOS and this is my first post. I am currently developing my very first report and need help with two issues.

The data I'm working with is of sales transactions. The report is simply a report a of all transactions for the previous business day. My first issue is how to have the report automatically filter for the previous business day (Monday-Friday) if my date field is in date/time format (i.e. Jul 30, 2019 4:49PM). I came across this formula but it seems to only work if it was simply date field:

[Date Field]=if (_day_of_week(current_date,7) <=2)
then (_add_days(current_date,-(_day_of_week(current_date,7)+1)))
else (_add_days(current_date,-1))

My second issue, which might actually be my first issue now that I think about it, is what formula to use to adjust for Japan local time (+14 hours)? The transactions I deal with are all in US Central Time so I would need to adjust the date/time field to add 14 hours.

Any help, suggestions, or ideas are appreciated!

Title: Re: 2 Part Question: Filter Report for Business Day AND Adjust for local date
Post by: Francis aka khayman on 24 Oct 2019 01:43:35 PM
you are probably using relational datasource... if not there might be an easier way depending on how your time dimension is set up