

Creator II
2017-11-14
05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why is true represented by '-1'and not '1' in some cases of Logical functions
- Tags:
- chart functions
3 Replies

MVP
2017-11-14
05:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
True() is always -1 in qlik. I don't see an instance where it returns 1 instead. Have you noticed such a case ?
2,592 Views


Creator II
2017-11-14
05:58 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its been same, Just curious to understand why it is -1.
2,592 Views

MVP
2017-11-14
06:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read this:On Boolean Fields and Functions
All Boolean functions and operations, e.g. IsNull(), True() and comparisons such as Date=Today() return 0 for FALSE and -1 for TRUE. Why minus one? Because it is equivalent to setting all the bits in the byte to 1, which is how TRUE is represented in most software systems (as opposed to FALSE, where all bits are set to 0).
2,593 Views
