Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

Bringing 2 columns of numbers into a new column depending on criteria

Hi all,

Fairly new to Qlik but loving the challenge.

I am slightly stuck on coding for something I am trying to create to go into a new column I would like to add in my table box.

There are 2 columns of numbers I would like to bring into one new column but this depends on the status of another column. For example in the top 3 rows in the table I would like to take the number from the delivered column and the bottom 2 rows from the budget column.

Can anyone share coding that can make this happen?

Thanks,

Ben

StatusBudgetDeliveredNew column
Delivered102020
Closed102020
Historic102020
In-Progress20020
Reserved20020
2 Replies

Hi,

one solution might be:

QlikCommunity_Thread_317266_Pic1.JPG

QlikCommunity_Thread_317266_Pic2.JPG

If(Match(Status,'Delivered','Closed','Historic'),Delivered,If(Match(Status,'In-Progress','Reserved'),Budget))

hope this helps

regards

Marco

Partner
Partner

hi

for the new column you can use something like

load

Status,

Budget,

Delivered,

if(match(Status,'Delivered','Closed','Historic'),Delivered,Budget) as NewColumn

from YOURTABLE;