

Table of Contents
“Float” column type should be used when you need to render numeric values with a decimal part. Even non-float content type from the input will be casted as a number, and render with the amount of numbers after the comma that was defined in the “wpDataTables settings page”.
“Yearly revenue” column in this table is a Float type column.
wdt_ID | Company name | Sector | Yearly revenue | Client since |
---|---|---|---|---|
1 | Black Turtle | Architecture | 10,000,000.00 | 29/05/2011 |
3 | Theodore Consulting | Technology | 11,000,000.00 | 17/05/2004 |
4 | White Wing Industries | Business Consulting | 1,250,000.00 | 18/05/2006 |
5 | Twinkles Inc. | IT | 8,000,000.00 | 01/05/2006 |
6 | The Large Company | Construction | 7,000,000.00 | 01/06/2015 |
8 | Jailbreak Machinery | IT | 27,500,000.00 | 01/06/2001 |
9 | Infinite Scroll Maniacs | IT | 20,000,000.00 | 28/05/1996 |
10 | Thebest Construction Agency | Construction | 90,000,000.00 | 01/05/1996 |
11 | Allen Planning | IT | 0.88 | 15/12/2017 |
12 | Hamburg Calling | Technology | 2,000,000.00 | 26/08/2004 |
wdt_ID | Company name | Sector | Yearly revenue | Client since |
∑ = 176,750,000.88 | ||||
Avg = 17,675,000.09 | ||||
Min = 0.88 | ||||
Max = 90,000,000.00 |
The “Float” column type has several interesting features that differ it from other column types.
From version 2.0 and on, you can set “Decimal places” per individual column that represents the number of digits to the right of a decimal point. If you leave this field blank, the column will use the number of decimal places defined on the “wpDataTables settings page“.
In addition, there are four calculation features you can enable for the “Float” columns. You can tick these checkboxes to calculate desired functions (Sum, Average, Minimum, Maximum) for all values for a given column. These calculations will be rendered in the table footer as you can see in the example above. See “Calculation functions“ chapter of this documentation for detailed info.
To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!