cognoscognos-8cognos-bicognos-10

Difficulty in performing Addition in query calculation in Cognos Report Studio version 10.2.1


I am trying to perform 'Addition' function for three columns horizontally in

Cognos Report Studio version 10.2.1

For eg: I want the output to look like this

Col1  |Col2  |Col3  |Col4(Calculated Col) 
12    |16    |10    |38 
1     |5     |2     |8  

All I am doing is selecting the column titles Col1, Col2, Col3 then right click and add calculation. It gives only one option that is to concatenate and the result is

Col1  |Col2  |Col3 |Col4 
12    |16    |10   |121610 
1     |5     |2    |152 

This is not what I want. Can anyone guide? Pls note: I also used a cast function to change the datatype to integer just to be on a safer side.

Thank you in advance


Solution

  • I was able to successfully perform addition to the columns by dragging a query calculation to the report and selecting the data items I wanted to perform addition. There was a datatype mismatch and hence was not able to perform any calculations. Thank you Marcus for your time and efforts. Appreciate it!