Loading

How to Round Down Numbers At Decimal Points in Tableau Desktop

Data pubblicazione: Apr 13, 2024
Operazione
How can I display the numbers round down after a certain decimal point?
When the result of multiplication results in a decimal point, how to display it by truncating. 

Example: 
$3456.15  → 3456  OR  $3456.15  → 3456.1
$3456.87  → 3456  OR  $3456.87  → 3456.8

Fasi
Create the following calculations to round down the numbers after a certain decimal point in Tableau Desktop.

Without Parameter (Not able to specify the decimal point):
  • Round down to the whole number: FLOOR(SUM([Sales]))   OR  FLOAT(INT(SUM([Sales)))
  • Round down with decimal point: FLOAT(INT(SUM([Sales])*10)/10)
With Parameter (Able to specify the decimal point):
  • FLOAT(INT(SUM([Sales])*[Number])/[Number])
  • The parameter setting is as follows:
  • User-added image
The results are as follows, please check the attached workbook for details:
User-added image
 
Risorse aggiuntive

Number Functions
Existing ROUND function only rounds up the numbers and not round off/down. 
Existing FLOOR function round off/down the numbers only to an integer and there is no option to specify the decimal points.
 

Numero articolo Knowledge

001469829

 
Caricamento
Salesforce Help | Article