COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: hittony on 09 Jan 2014 03:34:59 AM

Title: How can I put TIMESTAMP data in my crosstab measures area ?
Post by: hittony on 09 Jan 2014 03:34:59 AM
Hi, how can I put TIMESTAMP data in my crosstab measures area ?

THX ;)
Title: Re: How can I put TIMESTAMP data in my crosstab measures area ?
Post by: BigChris on 10 Jan 2014 04:36:57 AM
I might be wrong, but I don't think that's possible. Crosstabs are all about numeric measures. No doubt someone will prove me wrong, but you mighthave to go down the route of making a list report that looks like a crosstab.
Title: Re: How can I put TIMESTAMP data in my crosstab measures area ?
Post by: hittony on 10 Jan 2014 09:55:11 AM
A list report that looks like a crosstab ? You mean that i have to list all of the possibles values of my column ? I should call it an almost "crazy" idea.

But if I haven't no other choices, I am bound to do it...Horrible...
Title: Re: How can I put TIMESTAMP data in my crosstab measures area ?
Post by: anjidwh.cognos on 20 Jan 2014 03:26:02 AM
I guess we can..

SR
Title: Re: How can I put TIMESTAMP data in my crosstab measures area ?
Post by: Ixhers on 22 Jan 2014 07:17:52 AM
Just out of curiosity, why do you want to have a timestamp as a measurement?

/ Rob
Title: Re: How can I put TIMESTAMP data in my crosstab measures area ?
Post by: CognosPaul on 22 Jan 2014 09:00:24 AM
I can think of a few reasons you might need to see time as a measure in an xtab. Suppose you have a pivot of agents in rows, queue in columns with time logged in, time logged out, duration nested.


Corner  | Queue 1                    |
        | Log in| Log Out | Duration |
--------+-------+---------+----------+
Agent 1 | 09:00 | 10:00   |  1:00
Agent 2 | 08:55 | 10:00   |  1:05
Agent 3 | 11:30 | 12:00   |  0:30


and so on.

It's certainly possible to get timestamp data into a pivot, since timestamps are essentially numeric in origin. Depending on the data source it's a simple matter of converting to epoch (seconds from 1970, or any other base), finding the min/max/diff. Once the xtab is built, unlock the report and click on the <1234>. Change the source type to report expression and use the report functions to cast back into timestamp format. You can then use the datatype formatting to format to your needs.