Looking for some help on setting up some offsets. I have managed to create a calculated column in DAX for the month and week offset, but not sure how to do this for the fiscal year. Ideally I would like to have all of this within my M code.
I am working with a non-standard date table where the Financial year starts differently every year. Any help is appreciated.
Just wondering, is it the same logic to include the Month Offset and the Week offset into my M code also? I’ve just realised my DAX Month offset is not working for the month after where there is a week 53 so I need to use my M code logic.
Yes you are right, the process is the same. Fix your logic first in the language your most comfortabele with (I presume DAX) then transfer it to M leveraging the same technique as used for the FY Offset
Hi @Nurry90, did the response provided by @Melissa help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!
Hi @Nurry90, we’ve noticed that no response has been received from you since the 26th of February. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.
There is still a problem with your DAX logic for the FM Offset calculation and also with your PQ M “Fiscal Month & FY” asuming your MonthID is correct…
I recomment you do some thorough analysis on all your Fiscal date attributes, before you continue. However here’s the PQ M Offset logic that aligns with your Fiscal Year and MonthID
AddFMoffset = Table.AddColumn(AddFYOffset, "FiscalMonthOffset", each
((12* [Fin Yr]) +
(if [WkStartMonth]>=7 then [WkStartMonth]-6 else
( if ([WkStartMonth]=6 and [FY Week number]=1 ) then [WkStartMonth]-5 else
( if ([WkStartMonth]=6 and [FY Week number]=53) then [WkStartMonth]-6 else
[WkStartMonth] +6)))) -
((12* CurrentFY) + CurrentMID), type number )