If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Dynamic column label in Active Report

Started by Cognosy, 14 Sep 2018 12:20:00 AM

Previous topic - Next topic

Cognosy

Hi
I found relevant help in existing threads, but I am unable to work it out myself, and am seeking help here(Guilty face).

I am making an Active Report, where I would like to show last 3 month data. I have done proper data connections and modelling, now only thing I wish to do is that Column header of these respective 3 data column should change dynamically with today's date to say the respective month name.
For Example - Column header should say
                     "Available Volume for May",
                     "Available Volume for April",
                     "Available Volume for March"
When I am looking the report in June, and should change accordingly when I look in July to show for June/May/April. and so on.

I am using DB2. Cognos Analytics 11.0.10. I am a beginner.

Thank you for taking time to read through my issue.
AG

Cognos_Jan2017

Write three (3) Data Items which will be Labels replaced in the Report List column titless.

The 3 Data Items ...
1 - OneMonthOld
2 - TwoMonthOld
3 - ThreeMonthOld

Example for Data Item 'OneMonthOld' ..
The Expression Definition is ...

Case
When extract (month,Current_Date) = 1 Then 'Available Volume for December'
When extract (month,Current_Date) = 2 Then 'Available Volume for January'
When extract (month,Current_Date) = 3 Then 'Available Volume for February'
When extract (month,Current_Date) = 4 Then 'Available Volume for March'
When extract (month,Current_Date) = 5 Then 'Available Volume for April'
When extract (month,Current_Date) = 6 Then 'Available Volume for May'
When extract (month,Current_Date) = 7 Then 'Available Volume for June'
When extract (month,Current_Date) = 8 Then 'Available Volume for July'
When extract (month,Current_Date) = 9 Then 'Available Volume for August'
When extract (month,Current_Date) = 10 Then 'Available Volume for September'
When extract (month,Current_Date) = 11 Then 'Available Volume for October'
When extract (month,Current_Date) = 12 Then 'Available Volume for November'
End

Do similar Case Whens for TwoMonthOld and ThreeMonthOld.

In your Report, Unlock the Report by selecting the Ellipsis (3 horizontal dots) at the Top Right of the Report.
Click "Locked" which toggles to "Unlocked".

Select the appropriate "List column title" and delete that.  Then from your Query, drag in 'OneMonthOld".
Save the Report and in the Ellipsis at the Top Right, toggle from "Unlocked" to "Locked".

We are here to answer any questions. 

HTH, Bob

Cognosy

Hi Bob,
Thank You for such a patient reply.
It is working as per desirable need. :)

Note: I couldn't do the last step - Drag data item from Query to List Column Title, instead I changed the Source Type from Properties to Data Item Value and then selected the newly created data item in Data Item Value drop down.
AG

Cognos_Jan2017

AG - Glad it helps.

Quoteinstead I changed the Source Type from Properties to Data Item Value and then selected the newly created data item in Data Item Value drop down.

Good to know another method of placing a Data Item other than dragging.  THANK you, Bob