Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Status | Budget | Delivered | New column |
---|---|---|---|
Delivered | 10 | 20 | 20 |
Closed | 10 | 20 | 20 |
Historic | 10 | 20 | 20 |
In-Progress | 20 | 0 | 20 |
Reserved | 20 | 0 | 20 |
Hi,
one solution might be:
If(Match(Status,'Delivered','Closed','Historic'),Delivered,If(Match(Status,'In-Progress','Reserved'),Budget))
hope this helps
regards
Marco
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;