Einstein Analytics Tips & Tricks – Add Fiscal Date to a dataset created from CSV

Usecase Overview

Many times companies use Fiscal dates for financial reporting. For example, a fiscal year for a company can start from 1st Feb and end on 31st Jan and in this case Q1 would be Feb 1st – Apr 30th compared to a calendar Q1 of Jan 1st – Mar 31st.

To handle such scenarios on the dashboard and in datasets, Einstein Analytics gives you the ability to set:
fiscalMonthOffset: Difference between the first month of the fiscal year and first month of the calendar year (January). For example, if your fiscal year begins in February, set fiscalMonthOffset to ‘1’.

isYearEndFiscalYear: Because the fiscal year can start in one calendar year and end in another, you must specify which year to use for the fiscal year. The isYearEndFiscalYear attribute indicates whether the fiscal year is the year in which the fiscal year ends or begins.

For a date field that is coming from a Salesforce object, these parameters can be set in the sfdcDigest node. In this article, we detail the steps to add Fiscal dates for a dataset created from a CSV.

Step 1

Create the dataset in Einstein Analytics (using CSV option)
Load the dataset in EA and select the appropriate date format for the Date column.

Step 2

Create a dataflow and edgeMart the newly created dataset.
Add an EdgeMart node to the dataflow for extracting the newly created dataset. Then add a computeExpression node to create a new date field that has the fiscal properties. Finally, register the dataset.

Compute Expression Parameters:

  • SAQL Expression: toDate(‘Order_Date’, “M/d/yy”)
  • Date Format: M/d/yy
  • Is Year End Fiscal Year: Checked
  • Fiscal Month Offset: 2

Final Dataflow


Step 3

Save and run the dataflow.

Step 4

Check for Fiscal Date column in the created dataset.