Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why multiply by(-1) in Flags?

Please let me know

3 Replies
mseeck75
Partner - Contributor III
Partner - Contributor III

Hello Kay,

what do you mean with flags? Can you please post some more information about your problem.

BR

Matthias

MarcoWedel

please specify your question.

One possible answer:

logical value true is represented by -1

regards

Marco

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

We generally want our flags to be positive 1 so we can use the flag in a multiplication expression like:

=sum(LineSalesAmount * CurYTDFlag)

In qlikview, True is represented by -1. If the flag is created in script using a function that returns true/false (like InYearToDate) we multiply the result by -1 to derive a positive flag. For example:

InyearTodate(mydate,today()) * -1 as CurYTDFlag

-Rob