Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Separators . and ,

Good morning,

I have a question about formats:

My data are loaded with . as thousand separator. My regional configuration is Spanish and I need to write the expression as  =Num($(eEnplanedPassengers), '#.##0,00') to show my data 1.526.458,98

Even though, when I make comparations I have to write the conditional as:

if ([Load Factor %] >= 0.85, Green(),

   If ([Load Factor %] >= 0.70, LightBlue(),

    LightRed()))

Could you explain me the difference please?

Thank you in advance

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

In the script and in expressions, decimal point should always be used. Anything else would make a document non-portable. Comma is used as list separator.

But to load and interpret fields correctly, you need to "tell" QlikView what format you are using. This is best done by using

     SET ThousandSep='.';

     SET DecimalSep=',';

in the beginning of the script. This should be enough to get formatting right.

In addition, you can use interpretation and formatting functions:

     Num#(Field, '#', ',', '.')

     Num(Field, '#.##0,00', ',', '.')


HIC



View solution in original post

2 Replies
Michiel_QV_Fan
Specialist
Specialist

You could replace the '.' character by a ',' like this:

replace('eEnplanedPassengers', '.' , ',') as eEnplanedPassengers.

And

replace('Load Factor %', '.' , '.') AS [Load Factor %]



hic
Former Employee
Former Employee

In the script and in expressions, decimal point should always be used. Anything else would make a document non-portable. Comma is used as list separator.

But to load and interpret fields correctly, you need to "tell" QlikView what format you are using. This is best done by using

     SET ThousandSep='.';

     SET DecimalSep=',';

in the beginning of the script. This should be enough to get formatting right.

In addition, you can use interpretation and formatting functions:

     Num#(Field, '#', ',', '.')

     Num(Field, '#.##0,00', ',', '.')


HIC