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: 
Not applicable

Rounding to 1 decimal of the number lost when Saved to Excel in the Straight table

Hi All,

I have a Straight table where i need to show the number till one decimal place. Eg: 78.9,

I am able to show the same in the report using the Number tab of the Properties of the Straight table.

But when i save the report to Excel format using SAVE TO EXCEL, the number doesn't shown 1 decimal place as expected but shows the original value as 78.911111

I even tried using the Num(Expression,0.1) in the script to round the number to 1 decimal point it shows fine in the report but again the same issue when i am trying to Export to Excel the number shows all the decimal points.

Please let me know a way to show the Number to just 1 decimal point when i Save it to EXCEL.

1 Solution

Accepted Solutions
MarcoWedel

to round off:

Floor(yournumber, 0.1)

to round up:

Ceil(yournumber, 0.1)

to round to nearest multiple of 0.1:

Round(yournumber, 0.1)

For percentages use 0.001 instead of 0.1

hope this helps

regards

Marco

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

Use

Round(yourexpression, 0.01) as new expression in your table

Not applicable
Author

Hi Clever Anjos

Thanks for your reply

I tried the above Round function as per your comment but the decimal value is rounded of and i am unable to have the desired value.

The values before using the Round function:

BeforeExpression.PNG

The values After using the Round function:


AfterRound.PNG

MarcoWedel

to round off:

Floor(yournumber, 0.1)

to round up:

Ceil(yournumber, 0.1)

to round to nearest multiple of 0.1:

Round(yournumber, 0.1)

For percentages use 0.001 instead of 0.1

hope this helps

regards

Marco

Clever_Anjos
Employee
Employee

Try with

Round(yourexpression, 0.0001)

IuliaM
Contributor III
Contributor III

Hi,

This works, but only if I change the name of the expression. if I keep the same alias the formatting does not happen,  strangely.

thanks for the solution!

Iulia