
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
True (-1) or False (0)
Hi,
I have a table with, a field name, 'NameLetters'. 'NameLetters' consists of different letters, examples A, B, C, D. I need to set these to True or False. That is, if the letter A matches, it should be a True otherwise, it should be False. How do I do that?
Unfortunately, I can not do this in a simple if-sats, because it is not reset in Qlik -1 or 0.
Best regards
Anna
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use FindOneOf()
if(FindOneOf(NameLetters,'AB'),-1,0) as NewField
If a post helps to resolve your issue, please accept it as a Solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not clear what the letter is supposed to match...
Qlik has True() and False() available. You can also use 0 (False) or -1 (True) if you prefer those to the functions for whatever reason.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I need to use 0 or -1. How do I write this?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know how you'd write it, as it's not clear what your requirement is. Letters are supposed to match something, but you didn't explain what.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use FindOneOf()
if(FindOneOf(NameLetters,'AB'),-1,0) as NewField
If a post helps to resolve your issue, please accept it as a Solution.
