COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Dineshpullagura on 12 Feb 2015 03:03:24 PM

Title: Need sum of Measure
Post by: Dineshpullagura on 12 Feb 2015 03:03:24 PM
Hello,

I am using cube as my data source. I have four measures and two dimensions in my cube.  I am using a date prompt which prompts user to select a relative date like LTD, last one year, last six months etc.,

In my report i want to show the sum of a measure based on the user selected date. Let's say if user selects last one year from the prompt, i want to show the sum of the measure for the last one year.

I am using a singleton container to display the sum of the measure.   I have created a query which contains the measure data item and a detail filter which filters on the date.

This is how my Fact table looks like

Measure  Dimension1_id Dimension2_id
202              1                  101
203               2                 102
.
.


When i run my report based on the date selected by the user, instead of getting the sum of the measures, i am getting only the first value in the fact table (which is 202).

Please suggest.

Thanks for your time.
Title: Re: Need sum of Measure
Post by: Francis aka khayman on 12 Feb 2015 07:50:02 PM
are you sure you are getting the first value?

most probably you are getting the value as a result of your detail filter.

btw, detail filter is not a good idea in dimensional reporting.

Quote from: Dineshpullagura on 12 Feb 2015 03:03:24 PM
I have created a query which contains the measure data item and a detail filter which filters on the date.
Title: Re: Need sum of Measure
Post by: Dineshpullagura on 13 Feb 2015 08:24:07 AM
Yeah i have checked the query by "view tabular data". And the first value in that output is the what i am getting in the report output.

Yeah it is because of detailed filter, I checked using a slicer and it is giving the sum of the measure.


Thank you.