Forum Discussion
Anonymous
4 years agoNot applicable
Python to Dax help
Hello all,
I am currently trying to convert this below code into something that I can paste into DAX and create a new column that reads a date column and returns the fiscal week. To clarify, my Fiscal Year starts the week containing May 1st (Sun -Sat) and operates on 445 calendaring. If anyone could guide me on how to convert it that would be a huge help, thanks.
Thanks a ton
7 Replies
- vapid128Solution Specialist
You need a colnum of dates.
let us name it to [date].
add 3 colnums:
MMD = MONTH([Date])&"/"&DAY([Date])weeknum = WEEKNUM([Date])IsFiscalWeek = "5/1" in CALCULATETABLE(VALUES(Dates2[MMD]),ALLEXCEPT(Dates2,Dates2[weekIndex])) - AnonymousNot applicable
- vapid128Solution SpecialistSorry, my mistake.IsFiscalWeek = "5/1" in CALCULATETABLE(VALUES(Dates2[MMD]),ALLEXCEPT(Dates2,Dates2[weeknum])
- AnonymousNot applicable
When I try to make the IsFiscalWeek column I receive the following error message. I've tried changing Date and MMD value formats but none are working.
Thanks