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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Format numbers with 2 parameters

Hi guys, I have a field with the following numbers :

1.png

In this case I'd like to get only two possible numbers : 0,00 and 0,01.

I'm trying the following :

Numbers:

Load *, num(Number ,'#.##0,00') as NumberFormated;

LOAD * INLINE [

    Number

    "7,0390448e-018"

    "4,0030448e-018"

    "0,006"

];

But it outputs this :

What am I doing wrong?

Regards, Marcel.

1 Solution

Accepted Solutions
sunny_talwar

You might have to use Round() function

Numbers:

Load *, num(Round(Number, 0.01) ,'#.##0,00') as NumberFormated;

LOAD * INLINE [

    Number

    "7,0390448e-018"

    "4,0030448e-018"

    "0,006"

];

View solution in original post

1 Reply
sunny_talwar

You might have to use Round() function

Numbers:

Load *, num(Round(Number, 0.01) ,'#.##0,00') as NumberFormated;

LOAD * INLINE [

    Number

    "7,0390448e-018"

    "4,0030448e-018"

    "0,006"

];