Tableau Function: FLOOR

Tableau Function: FLOOR

Category: Number Functions

The FLOOR() function in Tableau returns the largest integer that is less than or equal to a given numeric value.
In other words, it rounds down a number to the nearest whole integer, regardless of whether the number is positive or negative.

Purpose

The FLOOR() function is used to standardize or round down numerical values for grouping, binning, or interval-based analysis.
It is especially useful when you want to create numeric categories, define ranges, or perform time-based rounding (e.g., rounding timestamps to the nearest hour or minute).

Type of Calculation

  • Mathematical / Rounding

  • Returns an integer result derived from a floating-point input by rounding down to the nearest whole number.

Practical Use Cases

  • Data Binning: Rounding numeric values down to create custom bins (e.g., rounding sales values to nearest 100).

  • Date-Time Rounding: Used in combination with date functions to group timestamps into intervals.

  • Financial Calculations: Truncate fractional currency values without rounding up.

  • Grouping Continuous Measures: Simplify numeric dimensions into discrete buckets.

  • Index or Rank Normalization: Create uniform ranges for indexing or ranking.


FLOOR(number)

ParameterTypeDescription
numberNumeric (scalar, column, or expression)The numeric value you want to round down to the nearest whole integer. Can be a constant, field, or expression.

How It Works?

The FLOOR() function mathematically returns:

It truncates any decimal part of a number and rounds toward negative infinity (always down).

Examples:

InputFormulaResultExplanation
4.7FLOOR(4.7)4Rounds down to nearest whole number
4.0FLOOR(4.0)4Already an integer
-3.2FLOOR(-3.2)-4Rounds down (toward more negative number)
0.99FLOOR(0.99)0Truncates decimal part

What Does It Return?

  • Type: Integer

  • Meaning: The greatest integer less than or equal to the given input.

  • Example: FLOOR(5.9) = 5

When Should We Use It?

Use FLOOR() when you want to:

  • Create bins or intervals from continuous numeric data.

  • Simplify numeric ranges for dashboards or filters.

  • Ensure consistent rounding down, even with negative numbers.

  • Convert decimal-based metrics (e.g., time or money) into integers.

  • Pair with other mathematical functions for controlled rounding operations.

Basic Usage


FLOOR(8.9)

Result: 8
Explanation: The largest integer less than or equal to 8.9 is 8.

Column Usage


FLOOR([Sales] / 100)

Result: Rounds down sales to the nearest 100.

SalesFLOOR(Sales / 100)Output Category
1234121200
8908800
4504400

This is useful for binning data into rounded categories.

Advanced Usage


DATETRUNC('hour', [Timestamp])

While Tableau has a dedicated DATETRUNC() function for time rounding, FLOOR() can assist in numeric timestamp calculations, such as converting hours:


FLOOR(DATEPART('minute', [Timestamp]) / 15)

This rounds down minutes to 15-minute intervals (0, 15, 30, 45).

Combining with Other Functions


FLOOR([Price] / 10) * 10

This rounds the price down to the nearest multiple of 10 — for instance, $47.85 becomes $40.

Tips and Tricks

  • Use FLOOR() for consistent downward rounding, especially for negative numbers.
  • Combine with CEILING() or ROUND() to control rounding direction.
  • Great for binning numeric data without creating bins manually.
  • Remember that FLOOR() always rounds down, not toward zero — negative inputs become more negative.
  • If you want to truncate decimals without rounding down negative values, use INT() instead.

Related Functions You Might Need

FunctionPurpose
CEILING(number)Rounds a number up to the nearest integer.
ROUND(number, decimals)Rounds a number to the nearest value at a given decimal precision.
INT(number)Converts a number to an integer by truncating the decimal (not rounding).
DIV(x, y)Performs integer division, similar to FLOOR(x/y) for positive numbers.
ABS(number)Returns the absolute value (can be combined for magnitude-based grouping).

We’ve got plenty of resources to help you master Tableau functions. For more details, check out the official Tableau documentation. Or, if you’re ready for more practice, let’s dive into related functions and build your Tableau skills further!

If you’re ready to harness the full power of Tableau and elevate your data analytics capabilities, our expert Tableau consulting services are here to guide you. Whether you need support with building advanced calculated fields, creating dynamic visual dashboards, or optimizing your data sources for peak performance, our team of experienced Tableau consultants delivers customized solutions designed for your business needs. Visit our Tableau Consulting page to discover how we can help your organization turn data into impactful, insight-driven decisions.

1. What does the FLOOR function do in Tableau?

The FLOOR() function rounds a number down to the nearest whole integer less than or equal to the input.

2. How is FLOOR() different from CEILING()?

FLOOR() always rounds down, while CEILING() always rounds up to the nearest integer.

3. Does FLOOR() handle negative numbers correctly?

Yes. For negative numbers, FLOOR() rounds toward negative infinity (e.g., FLOOR(-3.2) = -4).

4. What’s the difference between FLOOR() and INT()?

INT() truncates decimals toward zero, while FLOOR() always rounds down — even for negatives.

5. Can FLOOR() be used for grouping or binning?

Yes. It’s commonly used to group continuous numeric data into evenly spaced bins or ranges.