Building_Arithmetic_calculations
Building_Arithmetic_calculations
For example, you might have a requirement to Rounds a number or a field to the
nearest integer of equal or lesser value.
For this we can use the FLOOR function
There are many Aggregate functions available in Tableau, but we will be going
through only 2 functions
FLOOR
CEILING
BUILDING ARITHMETIC CALCULATIONS
FLOOR(number)
CEILING(number)
Step 5: The new calculated field appears under Measures in the Data pane.
Just like other fields, we can use it in one or more visualizations.
STEPS TO FLOOR AND CEILING FUNCTION
Step 6: Right-click Sales field, Default Properties > Number Format >
Number(Custom) > Decimal places ‘2’
STEPS TO FLOOR AND CEILING FUNCTION
Step 7: When Floor Sales and Ceiling Sales is placed on a shelf or card in
the worksheet, its name is changed to AGG( ),
which indicates that it is an aggregate calculation and cannot be aggregated
any further.
STEPS TO FLOOR AND CEILING FUNCTION
Step 8: Check the FLOOR and CEILING calculations in the below Viz
STEPS TO FLOOR AND CEILING FUNCTION
Step 9: Ceiling provides the nearest integer of equal or greater value
Floor provides the integer of equal or lesser value
e.g.: Ceiling Sales for Copiers is 149,529
Floor Sales for Copiers is 149,528