21 Replies Latest reply: Jul 3, 2014 10:57 AM by James Summerson

decimal values

Im new to qlikview.

i want to value in the chart like

22 = 22

and

22.22634547 = 22.23

but qlikview always show the value in the format

22 = 22.00

22.22634547 = 22.23

• Re: decimal values

Hi,

In the properties of your object (right click on the object -> properties) you have a "Number" window, in this window, you can specify how many decimals you want.

• Re: decimal values

Format as number with precision 2.

The format pattern should look like "#,###"

For the values

22

22.22634547

22.23

this should result in:

• Re: decimal values

hi there;
thanks for reply but i need this to be done in my chart, i made a chart and its not showing values in two decimals, as in, if i select fixed to 2 decimal values it shows 22.00 rather than the actual point value it must show(22.45), i dunno how to solve that. do share if yu've ever came across this

• Re: decimal values

Rabia,

it's the same setting: right click, choose properties, number. Make sure you select "Override document settings", choose type "Number" and 2 as precision. If needed you can override the default format pattern to "##,##"

I assume the value is used as an expression and not a dimension?

• Re: decimal values

I tried the number format, its showing me 22.00. and yes value is used as an expression.

• Re: decimal values

What is the number format used in 'Number' tab??

• Re: decimal values

Default because you define Number format in your expression.

PFA

Andrei !

• Re: decimal values

##.##

• Re: decimal values

Try using '##.00'

# = show if required

0= always show

• Re: decimal values

pls post ur sample app

• Re: decimal values

no its not like that

• Re: decimal values

Hi Rabia,

You should check whether your number has fractional part:

if(frac(Number)=0, num(Number,'###'), num(Number,'###,##'))

Hope this helps.

Andrei

• Re: decimal values

hi andrei

ive three expressions, so shall i paste this above code in all three of the expressions?

• Re: decimal values

Hi Rabia,

You should paste this code in all expression which you want to be shown in such manner.

If there are 3 expressions - paste them instead "Number" in above code.

Hope this helps.

Andrei

• Re: decimal values

okay lemme try this

• Re: decimal values

With 'Expression default' it should give the right number format.

• Re: decimal values

guys its not giving me... its still same and for the expression part, ive already codes in them. can i add more expression in the already expressioned chart?

• Re: decimal values

Hi Rabia,

You can try as below in the expression and set the Number format as "Expression Default"

=if(frac(Sales)=0,Num(Sales,'#,##0'),Num(round(Sales,0.01),'#,##0.00'))

Thanks,

TDP