MicroStrategy ONE
FiscalMonth
Returns the numeric position of a month within a fiscal year, for a given input date. This function is useful in financial reporting when the start of the fiscal year is different than the start of the calendar year.
Syntax
FiscalMonth<
firstMonth
>(
Date
/
Time
)
Where:
Date
/
Time
is the input date or timestamp.firstMonth
(default value is 1) is a parameter that determines which month is considered as the start of the fiscal year. You can type an integer value from 1 to 12, with 1 representing January, 2 representing February, and so on until 12 representing December.
For information on whether your database supports various date and time functions, see MicroStrategy and Database Support for Functions.
Example
Consider a report or dashboard that includes a Day attribute with a single ID form. You can create a metric with the following definition:
FiscalMonth<firstMonth=4>(Day)
For each element of the Day attribute, the metric displays the numeric position of the month within the fiscal year for that date. For this example, since the fiscal year starts in April, a date of July 4, 2014 would return 4. This is because July is the fourth month in the fiscal year.