Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
JOHN123
Contributor
Contributor

IF formula in the data load editor

Hi,

I have a client that had a name change in 2019. Now when viewing all the results from last year, the client that had a name change data is split up over the old and the new name and I want to write a "IF" formula that see's all the data for this client as one name. I have the following formula in place, but keep on getting the same error.

(Just using clientoldname and clientnewname for privacy)

Formula:

If(ShipmentClientDescription=Clientoldname,clientnewname) as ShipmentClientDescription,

I then get the error:

Feild "Clientoldname" not found.

I am using the formula correctly?

Thanks,

 

4 Replies
Taoufiq_Zarra

If(ShipmentClientDescription='Clientoldname','clientnewname') as ShipmentClientDescription,
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
davidfdezcalleja
Contributor II
Contributor II

Hi John,

you can use this example:

IF(Condition, then, else)

IF(  [producto]='XXXX'  ,  'YYYY'  ,   [producto]  ) as  [producto]

In your case I would be:

If( ShipmentClientDescription=Clientoldname , clientnewname,  ShipmentClientDescription) as ShipmentClientDescription

Regards,

David

 

 

fortaleza40
Contributor III
Contributor III

And if you use match to have a pattern between old and new name, for example if they keep part of the name as the same or have a code:

if(match(ShipmentClientDescription,clientCommonPattern),clientnewname) AS  ShipmentClientDescription

Kushal_Chawda

Would you be able to provide example with sample data?