Group by a Custom Fiscal Year
Filter by a Custom Fiscal Year
Dates Outside Ranges Defined by Custom Fiscal Year
Windowing Functions
coalesce
Previous Versions
After inheriting custom fiscal years, SAQL queries support custom fiscal year data.
Analytics supports custom fiscal year data by generating new fields that describe the custom fiscal year. Each of these new fields is named with the _Fiscal suffix. By working with these fields, SAQL supports custom fiscal year data.
Make sure that a dataset’s dataflow has run after inheriting custom fiscal years and before writing SAQL based on custom fiscal year data.
Each of the queries in the examples is based off the following dataset. These examples presume that Analytics inherited custom fiscal years that begin on February 1 and end on January 31. Custom fiscal years are defined from 2017 until 2022.
You can’t use custom fiscal year data with the fill or timeseries statements.
Note
| Opportunity Name | Created Date | Amount |
|---|---|---|
| Widgets | 2/15/2017 | 100 |
| Widgets | 1/25/2018 | 200 |
| Widgets | 3/30/2018 | 100 |
| Widgets | 3/30/2019 | 100 |
| Widgets | 3/30/2020 | 100 |
| Widgets | 3/30/2021 | 100 |
| Widgets | 3/30/2022 | 100 |
Here’s how to group by a custom fiscal year.
Filter by a Custom Fiscal Year
Here’s how to filter by a custom fiscal year date.
Dates Outside Ranges Defined by Custom Fiscal Year
If your query includes a date that falls outside of a range defined by an inherited fiscal year, SAQL does not return data for that date.
See Also