If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Total Data Items

Started by Sofie, 08 Jul 2019 04:07:49 AM

Previous topic - Next topic

Sofie

Hi

For my report I have created 3 Data Items which all give a total. Now I have to add those 3 Data Items up, but I don't seem to manage to do so. Does anyone have an idea how to do this? I've tried already different options, but all of them return an empty value.

Data Item 1 : Booked Project Hours
Expression : TOTAL(
IF ([Project Name] NOT STARTS WITH 'Z_IT' AND [Project Name] <> 'Non-Project Work')
THEN ([Hours])
ELSE NULL)

Data Item 2 : Booked Movement Hours
Expression : TOTAL(
IF ([Project Name] STARTS WITH 'Z_IT One Movement')
THEN ([Hours])
ELSE NULL)

Data Item 3 : Booked IT2.0 Hours
Expression : TOTAL(
IF ([Project Name] STARTS WITH 'Z_IT Project IT')
THEN ([Hours])
ELSE NULL)

Thank you for taking the time to look into this problem!

oscarca

Try:
IF ([Project Name] NOT STARTS WITH 'Z_IT' AND [Project Name] <> 'Non-Project Work')
THEN( total([Hours]))
ELSE(NULL)

or:
IF ([Project Name] NOT STARTS WITH 'Z_IT' AND [Project Name] <> 'Non-Project Work')
THEN( aggregate([Hours] for report))
ELSE(NULL)

Sofie

Hi oscara

Thank you for the reply.
The outcome of the 3 different Data Items is OK now, but for some reason they still don't add up to a global total.

To make the sum of the 3 Data Items, I'm using the following expression : [Booked Project Hours] + [Booked Movement Hours] + [Booked IT2.0 Hours]. Fot this sum, no data is returned...

I've tried with different expressions already, but without any result...

Francis aka khayman

most probably there is a null in one of your addends. try using else (0) instead

Sofie

Thank you all for the suggested solutions, unfortunately none of them gave the correct result.

However, I discussed this issue with one of our Daptiv consultants (the tool for which we are using Report Studio), and he gave me the solution. Apparently, I used the wrong option in the Aggregate and Rollup aggregate functions (I used None where I had to use Automatic).