Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
johanfo2
Creator
Creator

Error in num() formating?

This statement:

LOAD

    num('0,1', '#,00##') as TEST,

...

returns

0,1000

but I expect

0,10

I'm on a European system with decimal separator as ',', but I belive this problem is identical on US setup.

According to the documentation, I quote:

     0.000 describes the number with three decimals.

     0.0## describes the number with at least 1 decimal and at most three decimals.

Can anybody confirm this apparent bug?

JF

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Right. Must be a bug or a wrong format code example then..

Astrato.io Head of R&D

View solution in original post

7 Replies
marcus_sommer

'0,1' is a string and can't not formatted with num() - here you needed num(num#()). Also num() had further parameter which could defined the decimal separator, independent from system settings - see this and examples by F1.

- Marcus

rbecher
MVP
MVP

Hi JF,

which documentation do you refer to? I think there are only fixed decimals possible: '#0,00'

- Ralf

Astrato.io Head of R&D
johanfo2
Creator
Creator
Author

No, it does format the number. And further, changing '0,1' to 0.1 does not change the result.

The problem is that the documentation regarding num() refers to "format codes".  If you search the index in the help (F1) for "format codes", you find the text I'm quoting above.

johanfo2
Creator
Creator
Author

Press F1, help, seach index for "Format codes".   The problem is that num() doesn't behave accordingly.

rbecher
MVP
MVP

Right. Must be a bug or a wrong format code example then..

Astrato.io Head of R&D
johanfo2
Creator
Creator
Author

Surprisingly hard to find a place to submit this bug?

Do Qliktech have a bug submit form?

rbecher
MVP
MVP

They have a form to submit support cases in the Qonnect Partner Portal, see link below.

Maybe it's also good to move this thread into the QlikBug group..

Astrato.io Head of R&D