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
What is the FLOOR function?
The FLOOR function in DAX is used to round a given number down to the nearest specified multiple. It takes two arguments: the number you want to round, and the multiple to round to. For example, if you want to round the number 3.75 down to the nearest whole number, you would use the FLOOR function with a multiple of 1, like this:
=FLOOR(3.75, 1)
The result would be 3.
How to use the FLOOR function in Power BI
Now that we know what the FLOOR function does, let's take a look at how you can use it in Power BI. The FLOOR function can be used in a variety of ways, depending on your data analysis needs.
Rounding down to the nearest whole number
One common use of the FLOOR function is to round numbers down to the nearest whole number. This can be useful when you're working with data that needs to be presented in whole numbers, such as sales or customer counts. To round a number down to the nearest whole number in Power BI, use the FLOOR function with a multiple of 1, like this:
=FLOOR([Number], 1)
Replace "[Number]" with the actual field or column name of the number you want to round down.
Rounding down to the nearest ten, hundred, or thousand
In addition to rounding down to the nearest whole number, you can also use the FLOOR function to round down to the nearest ten, hundred, or thousand. This can be useful when you're working with large numbers and want to make them more manageable. To round a number down to the nearest ten, hundred, or thousand in Power BI, use the FLOOR function with a multiple of 10, 100, or 1000, respectively. For example, to round a number down to the nearest thousand, use the following formula:
=FLOOR([Number], 1000)
Rounding down to the nearest date
The FLOOR function can also be used to round down dates to the nearest specified date. For example, if you have a column of dates and want to group them by week, you can use the FLOOR function to round them down to the nearest Monday (or any other day of the week). To round down dates in Power BI, use the FLOOR function with a multiple of 7 (for weekly rounding) or 30 (for monthly rounding), like this:
=FLOOR([Date], 7)
Replace "[Date]" with the actual field or column name of the date you want to round down.
In conclusion, the FLOOR function in Power BI is a powerful tool for rounding numbers and dates down to the nearest specified multiple. Whether you're working with sales data, customer counts, or dates, the FLOOR function can help you make your data more manageable and easier to analyze. So next time you're working with data in Power BI, give the FLOOR function a try and see how it can enhance your data analysis.