Topic
  • 3 replies
  • Latest Post - ‏2013-01-02T10:06:07Z by SystemAdmin
SystemAdmin
SystemAdmin
15496 Posts

Pinned topic Cognos 10 Report Studio Question

‏2012-12-26T15:33:15Z |
I have been faced with a reporting question. I am trying to write a report in Report Studio and insert a calculated field. The report consists of transactions listed by Company Codes as my rows and transaction types as columns. With my measure being the transaction amount. The tx types are (1,5,6,7). The calculated column I need is an equation with the TX types; 1-5+6-7.

Example:
Type 1 Type 5 Type 6 Type 7 Total
Company 1 5.00 6.00 7.00 8.00 -2.00
Company 2 10.00 5.00 8.00 9.00 4.00

Can someone recommend something that would deliver this result.

Thanks.
Updated on 2013-01-02T10:06:07Z at 2013-01-02T10:06:07Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos 10 Report Studio Question

    ‏2012-12-27T18:04:59Z  
    Hi,

    Just drag a Query calculation from the Insertable pane--> tool box. And Add the Equation.

    Thanks.
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos 10 Report Studio Question

    ‏2012-12-28T15:56:47Z  
    Hi,

    Just drag a Query calculation from the Insertable pane--> tool box. And Add the Equation.

    Thanks.
    Correct, however I am having trouble coming up with a valid calculation. I need to calculate the results not the query items. Meaning the only column that is available is the Transaction type. I need to take the value of transaction type 1 and subtract it from the value of transaction type 5 and so on.

    It is that algorithm i cannot figure out.
    Thanks for the reply.
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos 10 Report Studio Question

    ‏2013-01-02T10:06:07Z  
    Correct, however I am having trouble coming up with a valid calculation. I need to calculate the results not the query items. Meaning the only column that is available is the Transaction type. I need to take the value of transaction type 1 and subtract it from the value of transaction type 5 and so on.

    It is that algorithm i cannot figure out.
    Thanks for the reply.
    Hi,

    Follow below -
    Create four calculated query items
    Type 1:
    If Transaction Type=1
    then (Transaction amount)
    else(0)

    Type 5:
    If Transaction Type=5
    then (Transaction amount)
    else(0)

    Type 6:
    If Transaction Type=6
    then (Transaction amount)
    else(0)

    Type 1:
    If Transaction Type=7
    then (Transaction amount)
    else(0)

    Now, create final calculated query item as -
    Type 1 - Type 5 + Type 6 - Type 7

    Hope this helps.
    sandvv suggested you the correct answer, but you did not understood it.

    Regards,
    Manish