Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to cast -1 to 1 while loading from Database

I have a strange issue, I have a field in my sql database which holds values 1 and 0 but when I load into QV its showing me -1 and 0 how should I change to 1 and 0...Thanks

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

this is not a QV behaviour, but you can use fabs(field) to have absolute value so -1 will become 1

danielrozental
Master II
Master II

if(fieldname=-1,1,0) ?

By the way, boolean fields have -1 or 0 values, so it's not really strange.