COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Prakash Bhai on 11 Sep 2014 01:04:30 AM

Title: barchart to display current and last year same month revenue values
Post by: Prakash Bhai on 11 Sep 2014 01:04:30 AM
Hi All,

I am working on Dim.Modelling, And I have a requirement, where when a user selects Month in drop down selection, The barchart has to display revenue related for that particular month in the current year vs last year.
(i.e If user selects August, It has to populate the values for Aug 2014 & Aug 2013.)

For this, I have used case stmnt ,   where ?Period_Grp? is a static choice and [MONTH] we have values in db as (1,2,3...12).

case when (?Period_Grp? = 'Months')
then
([MONTH] in ( (?Period?) , (?Period?-2)) ) .  When I execute this, I get only 1 value w.r.p to current month, but the chart is not showing previous year's month. Tried different possibilities, but not able to ......

So pls help me on this...

Thx in Advance,

Abhi

Title: Re: barchart to display current and last year same month revenue values
Post by: HalfBloodPrince on 11 Sep 2014 05:42:06 AM
try this

lag ( member , index_expression )
Returns the sibling member that is "index_expression" number of positions prior to "member".