Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Logic help

ID DATECODECODE2TYPENAME
2845/1/201368628863Direct with LandlordOil Price Information
28510/1/2007686370781We Sublease Communications Limited
2842/15/201668678883Our Subtenant Holdings Limited
2852/15/2016686827218Our SubtenantOil Price Information

   

Here I want to rename NAME Column for ID 284 and 285 with Type = Our Sublet

if(ID = 284 and Name = ' Holdings Limited' ,'Oil Price Information',

If (ID =285 and NAME = 'Oil Price Information','Communications Limited',NAME))

This logic is not working.How can I write it in a diff way ?

1 Solution

Accepted Solutions
sunny_talwar

NAME is not consistent in your expression. May be this:

if(ID = 284 and NAME = 'Holdings Limited' ,'Oil Price Information',

If (ID =285 and NAME = 'Oil Price Information','Communications Limited',NAME))

or may be this:

If(ID = 284 and WildMatch(NAME, '*Holdings Limited*'), 'Oil Price Information',

If(ID = 285 and WildMatch(NAME, '*Oil Price Information*'), 'Communications Limited', NAME))

View solution in original post

4 Replies
sunny_talwar

NAME is not consistent in your expression. May be this:

if(ID = 284 and NAME = 'Holdings Limited' ,'Oil Price Information',

If (ID =285 and NAME = 'Oil Price Information','Communications Limited',NAME))

or may be this:

If(ID = 284 and WildMatch(NAME, '*Holdings Limited*'), 'Oil Price Information',

If(ID = 285 and WildMatch(NAME, '*Oil Price Information*'), 'Communications Limited', NAME))

Not applicable
Author

It was typo here,but in the script it is consistent.

sunny_talwar

Did you try my WildMatch suggestion? May be there are unknown spaces before or after the text?

alexandros17
Partner - Champion III
Partner - Champion III

Try with

if(ID = 284 and Trim(NAME) = ' Holdings Limited' ,'Oil Price Information',

If (ID =285 and Trim(NAME) = 'Oil Price Information','Communications Limited',NAME)) as NAME

let me know