Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variables and comparisons

Hi Community, I've a problem with my QV model: I would like to make a comparison between a variable and a value from a specific field, in the following way:

if(FT_FattureT.NettoTot >= $(vFattTot),1,0)

(this is an extract from a linear table, where I would like to show a light signal green when the >= is true, red otherwise)

So the question is : why does it not work when I choose a floating point number for the vFattTot, such as 545,56? While it works well when I choose simply 545??

The field FT_Fatture.NettoTot contains floating point values...

Thanks to everyone is answering! ...And sorry for my English!

1 Solution

Accepted Solutions
Not applicable
Author

Hello Irene,

Make Sure in your script inicial variable has a "," as Decimal Step (SET DecimalSep=','; ) because if this variable is declared "SET DecimalSep='.'; " it does not work.

You have two ways:

1.- In your variable vFattTot use 545.56

2.- Change "." for ","

Best regards.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi,

you try

if(FT_FattureT.NettoTot >= '$(vFattTot)',1,0)

Not applicable
Author

Hello Irene,

Make Sure in your script inicial variable has a "," as Decimal Step (SET DecimalSep=','; ) because if this variable is declared "SET DecimalSep='.'; " it does not work.

You have two ways:

1.- In your variable vFattTot use 545.56

2.- Change "." for ","

Best regards.

Anonymous
Not applicable
Author

Hi Oswaldo, thank you for the answer, in fact the problem was really the one you described me! I've found a solution the fits perfectly my model! Thanks again! Bye