COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: saumil287 on 28 May 2012 01:45:59 AM

Title: Dynamically selecting query items from query subject
Post by: saumil287 on 28 May 2012 01:45:59 AM
Hi,
The datasource is CSV file.
I am having a table containing columns as BU, Location, Customer, product, Mar-12,Apr-12 and May-12.
The month columns are revenue columns.
Since the current-Month is May-12.
I only want May-12 columns which is based on current-Month & year.

The Final should be
BU, Location, Customer, Product, Current_Month(ie May-12)

Your Guidance is appreciated.

Thanks in advance
Title: Re: Dynamically selecting query items from query subject
Post by: wyconian on 20 Jul 2012 03:46:28 AM
Hi

You need to have some way of identifying which month is the current month.  As this is a csv file you could use another external file which details which is the current month.  You could then have a render variable on the month columns so you only render the column which matches the current month from the new external file.  All the other month columns would be in the report but will not be rendered.

You will need to update the external current month file when you need to change the month.

Another way of doing this would be to have a render variable on the month columns which compares the date against the current system date.  But that would only work if you wanted to see data from the current system date month i.e. it wouldn't work if you ran the report in July but only wanted to see May's data.

As the month columns are columns rather than rows you can't use a standard filter as that would only restrict rows not columns.

Good luck
Title: Re: Dynamically selecting query items from query subject
Post by: saumil287 on 16 Aug 2012 11:09:32 AM
Hi wyconian,
Thanks for your reply.
I'll Try and let you know.


Thanks again