COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 25 Apr 2016 10:58:31 AM

Title: Replace Member value at run time
Post by: cognos05 on 25 Apr 2016 10:58:31 AM
Hi,

I have a dimensional report  and I have a level sub regions,

I wanted to replace all the members in the subregion that starts with UnAssigned to ALL.

I may get example values like  UnAssigned - Prime -002,  UnAssigned - Habel -005 etc..


All these word UnAssigned must be replaced with ALL - Prime - 002 and All - Habel - 005 in run time.


My current data item just has the subregion level in it.

Can anyone help me with the code to make this replacement at report level.

Thanks,
Nithya
Title: Re: Replace Member value at run time
Post by: MFGF on 26 Apr 2016 03:43:25 AM
Quote from: nithya1224 on 25 Apr 2016 10:58:31 AM
Hi,

I have a dimensional report  and I have a level sub regions,

I wanted to replace all the members in the subregion that starts with UnAssigned to ALL.

I may get example values like  UnAssigned - Prime -002,  UnAssigned - Habel -005 etc..


All these word UnAssigned must be replaced with ALL - Prime - 002 and All - Habel - 005 in run time.


My current data item just has the subregion level in it.

Can anyone help me with the code to make this replacement at report level.

Thanks,
Nithya

Hi,

You'd probably need a filter() function to isolate these members:

filter([your SubRegion level], caption([your SubRegion level]) contains 'UnAssigned')

You could then summarise the measure values for this set

aggregate(currentMeasure within set [your expression above])

If you named this final calculation as ALL, that's the row heading you would see displayed.

MF.
Title: Re: Replace Member value at run time
Post by: cognos05 on 26 Apr 2016 10:21:20 AM
No this is different ,

I have to show all the members of subregion , if there are few members having value with UNASSIGNED then replace the members name who have unAssigned with ALL test.
           UnAssigned - 000 -    Should be shown as All -006
           UnAssigned - 012 -    Should be shown as All -012
           
Thanks,
Nithya