Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
girirajsinh
Contributor III

Num() and Format codes

Hello Folks,

Could any one explain in simple why / how Num() function give following result ?

I am not getting clear on the login on how it works.

I always understood that first it should prefer the format code defined within the function and if there is none specified then it follow what is mentioned in environment variable. Isn't it so ?

Also what does # this means ? If there is format code like # ##0.0## does it that there would be always 3 digits after the decimal ?

Thanks

It is always great to hear from you !

Br

Giri

2 Replies
MVP & Luminary
MVP & Luminary

Re: Num() and Format codes

The # sign is a wildcard for a single digit - if there is a digit available it will be show it - if there is none nothing will be displayed. This meant by a format-code like: # ##0.0##

num(0.123, '# ##0.0##') displayed 0.123

num(0.1, '# ##0.0##') displayed 0.1

num(0.1, '# ##0.000') displayed 0.100

- Marcus

mvaugusto
Contributor

Re: Num() and Format codes

this works fine!

Thanks