Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text object expression not displaying correctly

Hi,

When using the following expression in a text box the displayed field is not as expected:

=Num(Sum ([# Transported Passengers]) / 1000000, '#,##0.00')

Current display:

Should be:

Is it my document settings?

Thank you for helping out

Hein

7 Replies
Colin-Albert
Partner - Champion
Partner - Champion

What is displayed if you just show

Sum ([# Transported Passengers]) / 1000000


What version of Qlikview are you using? Version & build number?

Anonymous
Not applicable
Author

did you try:


=Num(Sum ([# Transported Passengers]) / 1000000, '###,###.#0')

also, what do your set statements look like for thousand separator and decimal symbol? (first few lines in your script)

MarcoWedel

Hi,

it's your thousand and decimal seperators.

i.e.:

SET ThousandSep=',';

SET DecimalSep='.';

delivers the expected result:

QlikCommunity_Thread_149633_Pic2.JPG

while

SET ThousandSep='.';

SET DecimalSep='.';

delivers

QlikCommunity_Thread_149633_Pic1.JPG

Although it would be best to correct the settings in the script, you could adjust your text box expression like this:

=Num(Sum ([# Transported Passengers]) / 1000000, '#,##0.00', '.', ',')

hope this helps

regards

Marco

Not applicable
Author

Both options worked.

1) updated my load script to

SET ThousandSep=',';

SET DecimalSep='.';

Reloaded data and changed # Transported Passengers setting to Integer

2) adjusted my text box expression to this:

=Num(Sum ([# Transported Passengers]) / 1000000, '#,##0.00', '.', ',')

Thank you all for your inputs.

Not applicable
Author

PS. How do you update global settings to always show thousand separator as ',' when creating a new QV document?

The default load script SET ThousandSep=' ';

and it should be SET ThousandSep=',';

jagan
Partner - Champion III
Partner - Champion III

Hi,

Copy this into a txt or qvs and include it in the qlikview file like below

//Load Script.txt

SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';



// Script to include in Qlikview file
$(Include=C:\Load Script.txt)


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thank you, does it mean that I cannot change my global settings and have to load script every time I create a new document?

Kind regards

Hein Frohnapfel