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

Adding two specific row's values in Crosstab (Analytics)

Started by HelloCognos, 09 Aug 2018 06:33:32 AM

Previous topic - Next topic

HelloCognos

Ok, I have been struggling with this one for a while.  :) :)

I need add up two rows values and show it in a third row in a List or Crosstab.

Please see my mockup attached.

I tried using the new Calculation Data Item but it is not working.

Thanks again for your time.

sdf


HelloCognos

Well, the issue I'm having is to how perform the calculation of the specific rows to be added together. Sure, Crosstab Space is a good idea but it seems to be more involved. Thanks a lot

Lynn

Quote from: HelloCognos on 09 Aug 2018 06:33:32 AM
Ok, I have been struggling with this one for a while.  :) :)

I need add up two rows values and show it in a third row in a List or Crosstab.

Please see my mockup attached.

I tried using the new Calculation Data Item but it is not working.

Thanks again for your time.

Is your source relational or dimensional?

If it is dimensional, bring in the elements as individual members rather than a set of members. Then you can click the two desired members and create your calculation.

If it is relational, create a query calculation using a case statement to aggregate your metric for the two desired types.


case [Your Cost Type Field]
  when 'Maint Cost' then [Your Value Field]
  when 'Repair Cost' then [Your Value Field]
else 0
end


HelloCognos


HelloCognos

Lynn, :)

This approach worked perfectly for adding up couple of rows and showing them in a different row. Once the addition is showing, I excluded the others that were included in the addition from the Crosstab. Works like a charm.

Created the Measure based on the Case Statement. Assigned the Data Item as Summary Calculation: Calculated and drop it to the Crosstab.

Thank you again!