Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
You could replace the '.' character by a ',' like this:
replace('eEnplanedPassengers', '.' , ',') as eEnplanedPassengers.
And
replace('Load Factor %', '.' , '.') AS [Load Factor %]
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