Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dhanu_today
Creator
Creator

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
MK_QSL
MVP
MVP

sum({<    FIN_YEAR=,

               FIN_QTR=,

               CAL_MONTH=,

               CAL_YEAR=,

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

               Category += {'contract'}

          >}$(vEOP_AMB))/10000000

dhanu_today
Creator
Creator
Author

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

Thanks,

Dhanu

tresesco
MVP
MVP

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
Creator
Creator
Author

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

Thanks,

Dhanu

PradeepReddy
Specialist II
Specialist II

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

tresesco
MVP
MVP

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

dhanu_today
Creator
Creator
Author

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