Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to create a new column to my data using the Qlik Sense editor. Based on the values in columns A:C i want to get the results in column D.
I used the following formula for it in excel:
=IF(A2="F56";"F56";IF(A2="F57";"F57";IF(AND(A2="F60";C2=4);"SKD";IF(AND(A2="F60";B2<>"phev";C2=1);"F60";IF(AND(A2="F60";B2="PHEV";C2=1);"F60_PHEV";IF(A2="F48";"F48";"")))))) |
Is this also possible in Qlik Sense?
@Ruud_Hogenboom like :
if(CITY='F56' or CITY='F57' or CITY='F48' ,CITY,if(CITY='F60' and PRDGRP=4,'SKD',if(CITY='F60' and FUEL<>'phev' and PRDGRP=1,'F60',if(CITY='F60' and FUEL='phev' and PRDGRP=1,'F60_PHEV',''))))
as New_CITY
example :
Data:
Load *,if(CITY='F56' or CITY='F57' or CITY='F48' ,CITY,if(CITY='F60' and PRDGRP=4,'SKD',if(CITY='F60' and FUEL<>'phev' and PRDGRP=1,'F60',if(CITY='F60' and FUEL='phev' and PRDGRP=1,'F60_PHEV',''))))
as New_CITY inline [
CITY,FUEL,PRDGRP
F56,petrol,1
F57,diesel,1
F60,petrol,1
F60,diesel,1
F60,phev,1
F60,petrol,4
F48,petrol,1
];
output:
@Ruud_Hogenboom like :
if(CITY='F56' or CITY='F57' or CITY='F48' ,CITY,if(CITY='F60' and PRDGRP=4,'SKD',if(CITY='F60' and FUEL<>'phev' and PRDGRP=1,'F60',if(CITY='F60' and FUEL='phev' and PRDGRP=1,'F60_PHEV',''))))
as New_CITY
example :
Data:
Load *,if(CITY='F56' or CITY='F57' or CITY='F48' ,CITY,if(CITY='F60' and PRDGRP=4,'SKD',if(CITY='F60' and FUEL<>'phev' and PRDGRP=1,'F60',if(CITY='F60' and FUEL='phev' and PRDGRP=1,'F60_PHEV',''))))
as New_CITY inline [
CITY,FUEL,PRDGRP
F56,petrol,1
F57,diesel,1
F60,petrol,1
F60,diesel,1
F60,phev,1
F60,petrol,4
F48,petrol,1
];
output:
Hi Taoufiq,
Thank you for your response.
That did the trick. Thank you very much.