COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: knip on 31 Oct 2012 02:52:42 AM

Title: Hi Experts...Need Help!!!
Post by: knip on 31 Oct 2012 02:52:42 AM
I have a database from where my date column is for ex 201208, (character form). and a fact column against it
My report has a drop down  for period type, when i run my report on 201208
My report should show previous 12 month values i.e (201207,201206,.........201107)




Title: Re: Hi Experts...Need Help!!!
Post by: wyconian on 31 Oct 2012 07:16:11 AM
Hi

Sounds like you have an issue in the filter based on the prompt.

First question is are you using a cube or a package straight from the dtaabase?  If you're using a package (sounds like you are) you need to have a filter something like this

date_column <= ?DATE_PROMPT? - 100

(You will need to use the names of your actual items)

This should give you all periods from the date prompt going back 12 months (e.g. 201209 - 100 = 201109)

Hope that helps  :)
Title: Re: Hi Experts...Need Help!!!
Post by: pricter on 31 Oct 2012 07:22:32 AM
Nice thought wyconian ;)

Just a simple add

Firstly you should cast your data item from character to integer.

Secondly If you want to show 12 months only you should use between for example

date_column between ?DATE_PROMPT? - 100 and ?DATE_PROMPT?
Title: Re: Hi Experts...Need Help!!!
Post by: knip on 31 Oct 2012 01:30:16 PM
Hi,
  Actually my requirement is i have a record in table in row level,my list report has to display records in column level (i should use list report) i.e
say ex:

201201     A    1.2
201202     B    1.3
201203     C    1.4
201204     D    1.5
201205     A    1.7

In my drop down i should have 13 month values (ex in 201205 reporting month i will have 201205,201204........201106)
now when i select 201205 from my drop down my list report first column will have record corresponding to 201205 i.e 1.7 and next column value against 201204 i.e 1.5 and so on...

If i select 201204 from drop down my first column in list will have value against 201204 i.e 1.4 and second column will have value against 20103 i.e 1.4