Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
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

Re: Separators . and ,

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
michielvandegoo
Valued Contributor

Re: Separators . and ,

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

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

And

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



Re: Separators . and ,

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