Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
suryaa30
Creator II
Creator II

Why is true represented by '-1'and not '1' in some cases of Logical functions

3 Replies
tresesco
MVP
MVP

True() is always -1 in qlik. I don't see an instance where it returns 1 instead. Have you noticed such a case ?

suryaa30
Creator II
Creator II
Author

Its been same, Just curious to understand why it is -1.

tresesco
MVP
MVP

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).