Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

dhanu_today
New Contributor III

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

7 Replies

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

dhanu_today
New Contributor III

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

MVP
MVP

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:

Load

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

dhanu_today
New Contributor III

Re: combining of 2 column values in one column

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

Thanks,

Dhanu

pradeepreddy
Valued Contributor II

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..

MVP
MVP

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.

dhanu_today
New Contributor III

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

Community Browser