Filter by a Custom Fiscal Year

Here’s how to filter by a custom fiscal year date.

Example 

1q = load "opportunities";
2q = filter q by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in ["current fiscal_year".."current_fiscal_year"];
3q = group q by 'CreatedDate_Year_Fiscal';
4q = foreach q generate
5   'CreatedDate_Year_Fiscal' as 'Fiscal Year',
6   count() as 'count';
7q = order q by 'CreatedDate_Year_Fiscal' asc;
8q = limit q 2000;

Here’s the query output.

Fiscal YearCount
20201