Get the start year of the Financial Year (DAX)
Start Financial Year =
VAR _FiscalMonthStart = 7
RETURN
IF (
MONTH([Date]) < _FiscalMonthStart // if month 1-6
, YEAR([Date]) - 1 // do nothing
, YEAR([Date]) + 0 // else add 1 year
)
Get the end year of the Financial Year (DAX)
End Financial Year =
VAR _FiscalMonthStart = 7
RETURN
IF (
MONTH([Date]) >= _FiscalMonthStart
, YEAR([Date]) + 1
, YEAR([Date])
)
Join the financial years (DAX)
Financial Year = [Start Financial Year] & "/" & [End Financial Year]
Returns true if the date_column is the current financial year, else false
Is Current Financial Year =
VAR __today = TODAY()
VAR __year = YEAR(__today)
VAR __startDate = IF (__today < DATE(__year, 7, 1), DATE(__year - 1, 7, 1), DATE(__year, 7, 1))
VAR __endDate = IF (__today > DATE(__year, 6, 30), DATE(__year + 1, 6, 30), DATE(__year, 6, 30))
RETURN
IF ('table_name'[date_column] >= __startDate && 'table_name'[date_column] <= __endDate, TRUE(), FALSE())
Returns true if the date_column is the last financial year, else false
Is Last Financial Year =
VAR __today = TODAY()
VAR __year = YEAR(__today) - 1
VAR __startDate = IF (__today < DATE(__year, 7, 1), DATE(__year - 1, 7, 1), DATE(__year, 7, 1))
VAR __endDate = IF (__today > DATE(__year, 6, 30), DATE(__year + 1, 6, 30), DATE(__year, 6, 30))
RETURN
IF ('table_name'[date_column] >= __startDate && 'table_name'[date_column] <= __endDate, TRUE(), FALSE())
Create a column showing the financial quarter number
Financial Quarter =
IF (MONTH([date_column]) >= 1 && MONTH([date_column]) <= 3, 3
, IF (MONTH([date_column]) >= 4 && MONTH([date_column]) <= 6, 4
, IF (MONTH([date_column]) >= 7 && MONTH([date_column]) <= 9, 1
, IF (MONTH([date_column]) >= 10 && MONTH([date_column]) <= 12, 2)
)
)
)