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
The `❰date❱` parameter refers to the date for which you want to find the corresponding quarter. This can be a reference to a date column in your dataset or a static date entered directly into the function.
Examples
Let's look at a few examples to better understand how to use the QUARTER function in Power BI.
Example 1: Using a Date Column
Suppose you have a dataset with a Date column, and you want to create a new column that shows the quarter for each date. You can use the following formula:
This formula creates a new column called Quarter, which calculates the quarter based on the values in the Date column.
Example 2: Using a Static Date
If you want to find the quarter for a specific date that is not in your dataset, you can use the QUARTER function with a static date. For example, if you want to find the quarter for January 1st, 2022, you can use the following formula:
This formula returns the value 1, indicating that January 1st, 2022 is in the first quarter of the year.
Additional Tips
Here are some additional tips to keep in mind when using the QUARTER function in Power BI:
- The QUARTER function returns a numeric value ranging from 1 to 4, representing the four quarters of the year.
- If the date parameter is not in a valid format, the function will return an error.
- You can combine the QUARTER function with other DAX functions to perform more complex calculations. For example, you can use the SUMX function to calculate the total sales for each quarter.
The QUARTER function is a useful tool for working with dates in Power BI. By using this function, you can quickly and easily find the quarter corresponding to a given date. Remember to follow the syntax for the function and keep in mind the additional tips to ensure accurate results.