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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Decimals in text box

Hello! I'm trying to eliminate the decimals

=Num(Sum(If(IDCode='39000' and Año=xAñoMax, Saldo))/Divisor)/Num(Sum(If(IDCode='19000' and Año=xAñoMax, Saldo))/Divisor)  *100

I used #.##0,0 but does't work

Display 21,234556 I want 21.2

Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Put the round on the outside:

=round(Num(Sum(If(IDCode='39000' and Año=xAñoMax, Saldo))/Divisor)/Num(Sum(If(IDCode='19000' and Año=xAñoMax, Saldo))/Divisor)  *100, 0.1)


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
MayilVahanan

HI

Try this

=Num(your expression, '#.##')

or

in number tab-> use fixed:2 decimal

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Or you can use round in your expression: round(21.234556, 0.1) returns 21.2


talk is cheap, supply exceeds demand
pgalvezt
Specialist
Specialist
Author

I tried but show the same number.

=(Round(Sum(If(IDConcepto='39000' and Año=xAñoMax, Saldo))/Divisor))/(Round(Sum(If(IDConcepto='19000' and Año=xAñoMax, Saldo))/Divisor) )

or

=(Sum(If(IDConcepto='39000' and Año=xAñoMax, Saldo, '#.##'))/Divisor)/(Sum(If(IDConcepto='19000' and Año=xAñoMax, Saldo, '#.##'))/Divisor)*100

Nothing happened.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Put the round on the outside:

=round(Num(Sum(If(IDCode='39000' and Año=xAñoMax, Saldo))/Divisor)/Num(Sum(If(IDCode='19000' and Año=xAñoMax, Saldo))/Divisor)  *100, 0.1)


talk is cheap, supply exceeds demand