Built-in Functions → quarterStartDate
quarterStartDate() is a scalar date function that returns the date of the first day of the current quarter.
Signature
quarterStartDate()
Returns
Date representing the first date of the current quarter. 
Example
Consider a case where you want to identify the beginning of the current quarter and the sales revenue that occurred after the start of the quarter, for instance, 04/01/2021.
- Start date of the current quarter
 
quarterStartDate()
- Sales after the start of the quarter
 
SALES.SALES.TIME_ID > quarterStartDate()
The following table illustrates the behavior of the quarterStartDate() date function:
| Product | Revenues | Sales Date | quarterStartDate() | Sales after quarterStartDate() | 
|---|---|---|---|---|
| CD | $200 | 03/25/2021 | 04/01/2021 | false | 
| Hard disk | $600 | 04/12/2021 | 04/01/2021 | true | 
| Cable | $550 | 05/14/2021 | 04/01/2021 | true | 
| Hardware | $800 | 05/21/2021 | 04/01/2021 | true | 
| Memory Card | $220 | 06/02/2021 | 04/01/2021 | true | 
Use the following steps for detailed instructions on how to use the quarterStartDate() date function:
Note
In the Cluster Management Console (CMC), create a tenant that includes Sample Data. The Sample Data includes the SALES schema.
- In the Navigation bar, select the Content tab, and then select + New → Add Dashboard.
 - In the Add Dashboard dialog, for Name, enter Product Dashboard, and then select Add.
 - In the Action bar, select + (add icon), or select + Add Insight.
 - In the Insight panel, select Listing Table or V.
 - In Tables, select Aggregated Table.
 - In the Data panel, select Add Data Set (+).
 - In the Manage Data Sets panel, in Tables, select SALES. Close the panel.
 - From the Data panel, drag and drop the following columns to the respective tray:
- From the Products table, drag and drop Category to the Grouping Dimension tray.
 - From the Sales table, drag and drop Revenue to the Measure tray. In the Properties panel, 
- For Number Format, select Dollar Rounded.
 
 
 - From the Data panel, drag and drop Add Formula to the Grouping Dimension tray.
 - The Formula Builder automatically opens:
- In Search Functions, select the down arrow, and then select Date Functions.
 - Double-click the quarterStartDate function, 
quarterStartDate(), to add the formula to the editor. - Select Validate & Save.
 - In the Properties panel, for Column Label, enter quarterStartDate().
 
 - From the Data panel, drag and drop Add Formula to the Grouping Dimension tray. 
- In the Formula Editor,  use the following condition:
SALES.SALES.TIME_ID > quarterStartDate()
 - Select Validate & Save.
 - In the Properties panel, for Column Label, enter Sales after quarterStartDate()
 
 - In the Formula Editor,  use the following condition:
 - Name the insight Revenue Per Product Category.
 - In the Action bar, select Save.
 
