COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: ry1633 on 21 Jul 2015 01:47:59 PM

Title: combining two fields into one for Query Subject
Post by: ry1633 on 21 Jul 2015 01:47:59 PM
This might be an easy question, but I'm a relative novice to Framework Manager.   I have two fields in a Query Subject in my Model, and establishment and it's corresponding establishment code.   I'd like to combine them into one in it's own Query Subject, since they will often be used together as such in my users' reports.

[ESTABLISHMENT].
[ESTABLISHMENT].[NAME]

When I right click on the parent Query Space --> Create -->  all I have is 'New Query Item' and I'm not sure how to proceed.  I could use some help.   many thanks - ryan
Title: Re: combining two fields into one for Query Subject
Post by: cognostechie on 21 Jul 2015 02:10:41 PM
What's your question? Do you want to combine the Establishment Code and Establishment into one field? or do you want to put those two fields in one query subject?
Title: Re: combining two fields into one for Query Subject
Post by: ry1633 on 21 Jul 2015 02:20:08 PM
I'd like to combine (concatenate?) them into one field.   But when I select them or the parent query subject - most all of the options under "Create" are grayed-out.   I thought I could maybe do it with a Calculation - but that option is grayed-out.
Title: Re: combining two fields into one for Query Subject
Post by: ry1633 on 21 Jul 2015 02:53:36 PM
I think I might have gotten it to work here with this:

http://www-01.ibm.com/support/docview.wss?uid=swg21345237

But how can I insert white space between the two fields, just to tidy it up a bit?
Title: Re: combining two fields into one for Query Subject
Post by: bdbits on 21 Jul 2015 03:22:23 PM
Concatenate a literal space in between the fields, just like is shown in your link. Or you could use a space-dash-space between the two elements. Or whatever you want in there.

[ESTABLISHMENT.NAME] + ' ' + [ESTABLISHMENT.CODE]

Title: Re: combining two fields into one for Query Subject
Post by: ry1633 on 22 Jul 2015 08:10:45 AM
ok, found it.  Must have just overlooked it.  thanks for your help.