COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Cognos8 on 20 Mar 2016 10:52:02 AM

Title: DQM-DMR -Lag
Post by: Cognos8 on 20 Mar 2016 10:52:02 AM
I have Year and month in 2 different dimensions. two prompts are used  for this. To display the previous member of year
i am using lag function. Lag function work separately. expected output is below. Since the previous year has 2014
and year column have 2014 in same row, output of query shows empty.

Model = DQM - DMR  model

Year  Month    Previous year
====  =====    ============
2015  January  2014
Title: Re: DQM-DMR -Lag
Post by: MFGF on 22 Mar 2016 07:03:11 AM
Quote from: Cognos8 on 20 Mar 2016 10:52:02 AM
I have Year and month in 2 different dimensions. two prompts are used  for this. To display the previous member of year
i am using lag function. Lag function work separately. expected output is below. Since the previous year has 2014
and year column have 2014 in same row, output of query shows empty.

Model = DQM - DMR  model

Year  Month    Previous year
====  =====    ============
2015  January  2014

List or crosstab? I'd expect a list to behave as above as it's one-dimensional. A crosstab should display both years quite happily though.

MF.