Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
omid5ive
Creator II

round integer number

hi

how can i round integer number?

for example:

i want to show 275612 ------->275000

1325----->1000

123--->100

1 Solution

Accepted Solutions
Chanty4u
MVP

7 Replies
Chanty4u
MVP

u can try this

round.PNG

tamilarasu
Champion

Hi Omid,

Try,

=If(Field<1000, Floor(Field,100), Floor(Field,1000))

Chanty4u
MVP

or

If you have values in dimension or set analysis expression then try like this

Round(Sum(Sales), 1000)

OR

Round(Sales, 1000)

ajsjoshua
Specialist

Hi,

Try

Floor(275612 )

omid5ive
Creator II
Author

thank you

tamilarasu
Champion

Did you check the other two scenarios.? It gives the wrong result.

Chanty4u
MVP

As per raj. its gives u best shot through the script.

try below script

Round:

LOAD * INLINE [

    a, b

    275612, num

    1325, dd

    123, pp

];

LOAD *,

If(a<1000, Floor(a,100), Floor(a,1000)) as new1

Resident Round;