A
C
- CALCULATE
- CALCULATETABLE
- CALENDAR
- CALENDARAUTO
- CEILING
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CLOSINGBALANCEMONTH
- CLOSINGBALANCEQUARTER
- CLOSINGBALANCEYEAR
- COALESCE
- COLUMNSTATISTICS
- COMBIN
- COMBINA
- COMBINEVALUES
- CONCATENATE
- CONCATENATEX
- CONFIDENCE.NORM
- CONFIDENCE.T
- CONTAINS
- CONTAINSROW
- CONTAINSSTRING
- CONTAINSSTRINGEXACT
- CONVERT
- COS
- COSH
- COT
- COTH
- COUNT
- COUNTA
- COUNTAX
- COUNTBLANK
- COUNTROWS
- COUNTX
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNCD
- COUPNUM
- COUPPCD
- CROSSFILTER
- CROSSJOIN
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENTGROUP
- CUSTOMDATA
D
E
I
N
O
P
R
S
- SAMEPERIODLASTYEAR
- SAMPLE
- SEARCH
- SECOND
- SELECTCOLUMNS
- SELECTEDMEASURE
- SELECTEDMEASUREFORMATSTRING
- SELECTEDMEASURENAME
- SELECTEDVALUE
- SIGN
- SIN
- SINH
- SLN
- SQRT
- SQRTPI
- STARTOFMONTH
- STARTOFQUARTER
- STARTOFYEAR
- STDEVX.P
- STDEVX.S
- STDEV.P
- STDEV.S
- SUBSTITUTE
- SUBSTITUTEWITHINDEX
- SUM
- SUMMARIZE
- SUMMARIZECOLUMNS
- SUMX
- SWITCH
- SYD
T
U
Syntax of the INT Function
The syntax of the INT function is as follows:
INT(❰number❱)
Here, `❰number❱` is the number that you want to round down to the nearest integer.
Usage of the INT Function
The INT function can be used in a variety of scenarios. Let's take a look at a few examples:
Example 1
Suppose you have a Sales table in your Power BI report with a column named `Revenue`. You want to calculate the total revenue for each product category, rounded down to the nearest whole number. You can achieve this using the following DAX formula:
Total Revenue = SUMX(‘Sales’, INT(‘Sales'[Revenue]))
Here, `SUMX` calculates the sum of the values returned by the `INT` function for each row in the Sales table.
Example 2
Suppose you have a Customer table in your Power BI report with a column named `Age`. You want to calculate the average age of all customers, rounded down to the nearest whole number. You can achieve this using the following DAX formula:
Average Age = INT(AVERAGE(‘Customer'[Age]))
Here, `AVERAGE` calculates the average of the values in the `Age` column, and the `INT` function rounds the result down to the nearest whole number.
Example 3
Suppose you have a table named `Inventory` in your Power BI report with a column named `Units in Stock`. You want to calculate the total number of units in stock that are in multiples of 10. You can achieve this using the following DAX formula:
Total Units in Stock = SUMX(‘Inventory’, INT(‘Inventory'[Units in Stock]/10)*10)
Here, the `INT` function rounds the value in the `Units in Stock` column down to the nearest multiple of 10, and then multiplies it by 10 to get the final value.
The INT function in DAX is a powerful tool that can be used to round off numbers to the nearest whole number. It is a simple and easy-to-use function that can be used in a variety of scenarios. We hope this article has helped you understand the syntax and usage of the INT function in Power BI.