COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: reginoilano on 18 Jan 2010 04:35:02 AM

Title: Get total of a measure
Post by: reginoilano on 18 Jan 2010 04:35:02 AM
Hi,

I would like to ask for some suggestions...

store is filtered into this query and  have a measure that has a calculation logic: [measure] for all product per store

does this mean that the technical formula to get the total is:

Total([measure] for [store]) or Total([measure] for [product]) ???

thank you guys for always helping me..

Title: Re: Get total of a measure
Post by: MFGF on 18 Jan 2010 04:50:07 AM
Hi,

Sorry - I don't quite understand what you're trying to achieve.  Is the measure total being used within a list column?  Or do you want measure totals in group footings?  Or just a standalone total?

What I think you have so far is:

If you just want the measure totalling in the Group or Overall footer, simply select the measure column and use the Aggregate button on the toolbar.  If not, you may need to set up a calculation along the lines of total([Measure] for report), but it depends what you're trying to do.

Whichever, you wouldn't use an OR like this in a calculation.  Could you provide more info about exactly what you're trying to do?

Thanks,

MF.
Title: Re: Get total of a measure
Post by: reginoilano on 18 Jan 2010 05:37:45 AM
Hi,

Yes, I need to create a calculation that will get the amount for all product per store.

I'm having difficulty in making the right syntax for this formula..

please disregard the OR that I said earlier since I was confused on what formula should I use between the two to get the amount for all product per store.

Thanks!
Title: Re: Get total of a measure
Post by: MFGF on 18 Jan 2010 07:08:24 AM
Sorry - I'm still not quite clear on this.  Do you want a total for each product within a store (product total), or for all products within a store (store total).

Are the total(s) to be displayed in a column in the list or in a footing?

Thanks,

MF.
Title: Re: Get total of a measure
Post by: reginoilano on 18 Jan 2010 08:16:30 PM
Hi MF,

Yes, I need to get the Total amount for all products within a store (Store Total) and it will be shown as part of the column list, how can I achieved this?

Thank you so much!
Title: Re: Get total of a measure
Post by: MFGF on 19 Jan 2010 02:56:12 AM
Hi,

To display the Store totals in a list column, add a Query Calculation with the expression

total([Measure] for [Store]).

Alternatively, if you already have a Measure column showing Product values, simply select this and use the Aggregate button on the toolbar, and select the Total option.  This will add footer values to the list totalling the Measure values.

For both of the above, ensure you have grouped on the Store value beforehand.

Regards,

MF.
Title: Re: Get total of a measure
Post by: reginoilano on 24 Jan 2010 09:14:53 PM
Thanks MF,

This solution works fine!