COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Segwar on 06 Jul 2011 12:38:24 PM

Title: Query Calculation for the last 24 hrs in Audit Reports
Post by: Segwar on 06 Jul 2011 12:38:24 PM
Hi,

I am working on creating a Simple Audit report which should return the number of users who logged on in the last 24 hrs (from the report run time).
I have created a simple query calculation whose code is as follows

count ([Audit].[User Logins].[User name])

I am an admin who is new to report studio and need to know the code that will restrict the output of my query calculation to the data in the last 24 hrs from the report run time.

Thanks
Segwar
Title: Re: Query Calculation for the last 24 hrs in Audit Reports
Post by: ramesh_ek on 23 Jul 2012 01:57:13 AM
Hi Segwar,

Use the following calculation in ur query item,

_add_days([Audit].[COGIPF_RUNREPORT].[TIME STAMP],-1)

Hope this will help you.......!

Ramesh