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 of grouped rows

Started by Rosanero4Ever, 02 Apr 2014 09:55:52 AM

Previous topic - Next topic

Rosanero4Ever

Hi all,

I have a small List with grouped rows and two measures. (see the attached picture, please)
For first measure I would like the sum of the grouped values.
I also tried to group Measure1 as shown in the second part of my pictures, but the result is still 1200 instead of 600.
How can I edit the summary expression in order to obtain what I desire?
Many thanks in advance


Lynn

Have you reviewed the Forum Etiquette yet? http://www.cognoise.com/index.php/topic,24030.0.html

I suspect you have a relational source but you should indicate relational or dimensional to get the correct advice.

The total of 1200 is the correct total for the data based on what you are showing. The image you attached says you want 700 while your post indicates 600. What is it that you want and what is the basis for the aggregation?

I haven't come across a situation where it makes sense to group a measure. Is it possible that your measure 1 isn't really a measure or that it has incorrect aggregation information in your model?

Rosanero4Ever

hi,

I use relational model.
Value I want obtain is 600 (700 is an error in my picture).
Measure1 is a measure and in my model it is aggregated with a total function.
Many thanks

Lynn

If the model is correct then your total value of 1200 is correct.

What is the basis for aggregating differently?
Is this a price that should be averaged rather than totaled?
Is it modeled as a measure but really ought to be modeled as an attribute?
Do you have auto group and summarize turned on for the query?
Are the figures on the detail lines representing an aggregation of multiple items beneath? You can do a total function with a "for" to indicate scope, but I can't tell from the information you have provided what that scope ought to be.

Maybe someone else can provide an easy way to defy the laws of mathematics since I'm just not understanding your requirement other than that you want a list of numbers to aggregate differently than what your modeler has specified ;)

Waydin2296

Quote from: Rosanero4Ever on 02 Apr 2014 11:39:31 AM
I use relational model.
Value I want obtain is 600 (700 is an error in my picture).
Measure1 is a measure and in my model it is aggregated with a total function.

Hi there, I believe you mean that the Bike and Glasses in the example are 500 and 100. 
So let's say they were quantities
The sub article is causing the amount to repeat.  Bike 500, 500, Glasses 100, 100
You can use a determinant to control the aggregation (avoid double counting). 
For example,
If the key was Company, Location, Article, Sub article for the fact you are totalling
Yet, you wish to total by Company, Location, Article (the determinant you want to add)

Try it and let me know if that helps  :)

Rosanero4Ever

Hi,

I solved following Waydin2296 advice, i.e. creating a determinant
Thanks all