Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
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

Re: Logic help

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

Re: Logic help

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

Not applicable

Re: Logic help

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

Re: Logic help

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

Re: Logic help

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