Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trouble with the num() function

Hi All,

I'm working through the Qlikview 11 for developers book. I've hit a snag, and can't see where I have gone wrong.

I'm busy with the gauge section and mine just isn't coming out right, I am adding a text in chart to display a % the script I've written is:


=Num (Sum ([# Transported Passengers]) / Sum ([# Available Seats]), '##.#%')

Which puts a % display onto my gauge, but instead of displaying 78.6% it displays 78.#%

On my second gauge I've put in this script also for a text in chart:

=Num (Sum ( [# Departures Performed] ) / Sum ( [# Departures Scheduled] ) , '##.#%' )

On this chart it displays 1,1e+002.#% instead of 110.2%

Any help with this matter would be greatly appreciated.

Also I have attached a snip of my first gauge and script.

Thanks

7 Replies
oknotsen
Master III
Master III

Did you start the file from scratch?

If so, can it be that in your part of the world you use a comma for decimals and a point for thousands (like for example the Netherlands and Belgium)? If so, check the first few SET statements of your load script and switch the point and the comma around.

May you live in interesting times!
sudeepkm
Specialist III
Specialist III

can you try '#,##0.0%'

sasiparupudi1
Master III
Master III

num(YourExpression,'# ##0.00%')

Anonymous
Not applicable
Author

=num(Sum([# Transported Passengers])/sum([# Available Seats]),'##.#%')

qlikviewwizard
Master II
Master II

num(YourExpression,'# ###.#%')

Not applicable
Author

I found out that it only happens when I type the format pattern, but If I copy paste the format pattern from the number tab when integer is selected it works fine.

I think it might be a setting on my pc, any one else heard of this?

Thanks for all your responses!

oknotsen
Master III
Master III

I have seen problems with different quotes, but that would give you a clear error and does not seem to be the case here.

Are you using a special character set or language setting? In other words, something exotic far away from the "US / International" keyboard?

May you live in interesting times!