7 Replies Latest reply: Jan 30, 2014 11:48 AM by dhanu today

# combining of 2 column values in one column

Hi All,

I have the requirement like below.

In a list box(Category) have the values like New joinee,Permanent,contract,Supervisor etc...

if am selecting the 'new joinee' values is 500 and for 'permanent'  is 1000,'contract'  is 1800 and 'supervisor ' is 4000.As usual based on the selection data is populating into the table as per below calculation.

But as per req if am slecting the 'New joinee' it has to show both the values of contact+Newjoinee(2300) in a column 'New joinee'

The expression which i have used as below and varibale is not creating any problem.

sum({<FIN_YEAR=,FIN_QTR=,CAL_MONTH=,CAL_YEAR=,PERIOD = {"\$(=MAX(PERIOD))"}>}\$(vEOP_AMB))/10000000

I have sued the 'Category' at dimension level.I have to calucate at design level.

Thanks ,

Dhanu

• ###### Re: combining of 2 column values in one column

sum({<    FIN_YEAR=,

FIN_QTR=,

CAL_MONTH=,

CAL_YEAR=,

PERIOD = {"\$(=MAX(PERIOD))"}

Category += {'contract'}

>}\$(vEOP_AMB))/10000000

• ###### Re: combining of 2 column values in one column

Thanks Manish...But after applying that if am selecting the contract am getting the value of contratc only.

Thanks,

Dhanu

• ###### Re: combining of 2 column values in one column

Instead of hard coding the Category value, try to use the function 'GetFieldSelections (Category)' in the above expression..

• ###### Re: combining of 2 column values in one column

May be like : calculated dimension: If( Match(Category, 'new joinee', 'contract'), 'NewJoinee', Category)

Else in the script:

If( Match(Category, 'new joinee', 'contract'), 'NewJoinee', Category) as Category

• ###### Re: combining of 2 column values in one column

Thanks Tresesco. I have applied that script in design level But no Luck..

Thanks,

Dhanu

• ###### Re: combining of 2 column values in one column

Try to post a sample qvw and explain the expected output there against the sample data.

• ###### Re: combining of 2 column values in one column

I got the solution after getting that it seems simple.

I have created the some dummy field Category2 at script level.

If( wildmatch(Category, 'permanent'),permanent,

If( wildmatch(Category,'supervisor '), 'supervisor ', Category2))) as Category_derived

Then Category_derived field i have populated into the dim level in my table.

Thanks,

Dhanu