COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: psrpsrpsr on 20 Jul 2017 09:42:07 AM

Title: How to replace a field value with something else and display in crosstab header?
Post by: psrpsrpsr on 20 Jul 2017 09:42:07 AM
I have a simple crosstab that compares a metric between current year and prior year:

Week Number    27  28  29  30
2017                   15  20  17  19
2016                   11  21  13  15

A user has requested that the current week be replaced with 'CW'. Let's say that the current week is 29 - the output should look like:

Week Number    27  28  CW  30
2017                   15  20  17    19
2016                   11  21  13    15

Is this possible? How would I do this? THANKS
Title: Re: How to replace a field value with something else and display in crosstab header?
Post by: New_Guy on 20 Jul 2017 11:39:50 AM
Hi,
Use _week_of_year (current_date) in a data item and place it in the column header beside the membercaption  and render the headers based on a variable with definition like _memberCaption([yourweekmember]) = _week_of_year (current_date).

Good luck
New guy