
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ceil and floor functions
Hello community,
What is the application of ceil and floor function?
Have any of you used it in a real time scenario?
Kindly reply as none of my questions have ever been answered on the community.
Regards,
Vishal
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Vishal,
Ceil function will round up a number. Ex: ceil(3.4) will return 4.
Floor will round down a number. Ex: floor(3.4) will return 3.
I use this when working with timestamps with hour and minutes values. Behind each date there's a number associated. Those dates with time, will have a decimal value (56321,23) where 23 represents the time and minutes (this is a random example!).
When in your model you don't need to use the hour, you can use ceil(Date) so your dates will always be DD/MM/YYYY 00:00:00 instead of DD/MM/YYYY 10:36:00.
This can also be used to format values. If you are working with big amounts, it might not tell you much to show the decimal. Instead of showing $26.354.201,31, you can use the ceil or floor function and round up/down the number, or using the format in the Number tab for the charts.
I hope this helps.
J

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Vishal,
Ceil function will round up a number. Ex: ceil(3.4) will return 4.
Floor will round down a number. Ex: floor(3.4) will return 3.
I use this when working with timestamps with hour and minutes values. Behind each date there's a number associated. Those dates with time, will have a decimal value (56321,23) where 23 represents the time and minutes (this is a random example!).
When in your model you don't need to use the hour, you can use ceil(Date) so your dates will always be DD/MM/YYYY 00:00:00 instead of DD/MM/YYYY 10:36:00.
This can also be used to format values. If you are working with big amounts, it might not tell you much to show the decimal. Instead of showing $26.354.201,31, you can use the ceil or floor function and round up/down the number, or using the format in the Number tab for the charts.
I hope this helps.
J

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had to use ceil in an expression that calculates the amount of days worked based on the number of hours worked. Even if the employees worked half or a quarter of their norm, I had to consider the day as worked.
