I would like to calculate a new column(or measurement) called “CurrentFiscalYearCutOff” to indicate the current fiscal year, previous fiscal year, Previous-2 fiscal year.
CurrentFiscalYearCutoff=0, current fiscal year
CurrentFiscalYearCutoff=-1, previous fiscal year
CurrentFiscalYearCutOff=-2, previous -2 fiscal year
For information the Fiscal year starts on November 1st and ended on Oct 31.
One more thing, the fact table (cases) and Dates table have inactive relationships but I am not sure whether this matter when we calculate the “CurrentFiscalYearCutOff”.
I would like to calculate the same for 'CurrentFiscalQuarterCutoff" to identify the current fiscal quarter, previous fiscal quarter and previous -2 fiscal quarter. Your help will be appreciated. Thank you.
You would just need to, within a calculated column, work out what financial year you are currently in and then subtract the financial year from each row.
Something like this.
Fin. Year Cut Off =
VAR CurrentFinYr = VALUE( CALCULATE( MAX( Dates[Year] ), Dates[Date] = TODAY() ) )
RETURN
IF( CurrentFinYr = Dates[Financial Year], 0, Dates[Financial Year] - CurrentFinYr )
One More thing, I still cannot figure out how to calculate the same for Current Fiscal Quarter Cut Off and it seems complex and have no clue how to do it. thank you.
The expected result is like this:
if Dates(Fiscal Quarter)=Current FY Quarter, then “Current FY Quarter Cutoff”=0,
if Dates (Fiscal Quarter) = Previous FY Quarter then “Current FY Quarter Cutoff” = “-1”
If Dates (Fiscal Quarter) = Previous 2 FY Quarter then “Current FY Quarter Cutoff”="-2".
I first calculate the “Current FY Quarter” (refer to below DAX)
I am wondering how to calculate the difference of current Fiscal Quarter “19-Q1” and previous Fiscal Quarter “18-Q4” and get “-1” as expected? Thank you.
Background information:
Fiscal Year started November 1 and ended October 31.
The goal is to create “Current Fiscal Quarter Cut Off” :
For example,
0=Current Fiscal Quarter,
-1= Immediately Past Previous Fiscal Quarter,
-2=Previous 2 Fiscal Quarter,
-3 = Previous 3 Fiscal Quarter etc.
…
-N = Previous N Fiscal Quarter
Steps & questions: Step 1 to calculate the Current Fiscal Quarter - (Success)
Step 2 Issue: DATEDIFF can only calculate the number of “Calendar Quarters” between two dates. I wonder how to calculat the number of “Fiscal Quarter” between two dates.
For example, If today =November 13 2018 and Dates (Date)= Oct 31 2018, I am expecting “-1” as a result. but What I got is “0” because Nov 13 and Oct 31 are within same calendar quarter which is 18-Q4 but they are not in the same Fiscal Quarter.
Does this make sense? I am wondering if it is possible to calculate the number of fiscal quarter between two dates? Thank you.
To add on, why I calculate this “Fiscal FY Quarter Cut Off”? I need this to dynamically display only Current and Previous 4 Fiscal Quarters Information in Bar Chart or case table.