Forum Discussion
creating date/calendar table
Hi all,
need some advice here, i am trying to follow the steps here
https://www.powerobjects.com/blog/2018/12/19/sorting-data-fiscal-year-power-bi/
but got this error: The following syntax error occurred during parsing: Invalid token, Line 3, Offset 10, “.
Can anyone advice
Hi Anonymous ,
You may need to change the syntax "– 1" to "-1" in your formula in English input format, then it will work well.
FYMonthNum =
VAR FYStartMonth = 4
//Update the fiscal year starting month above *Use number between 1 to 12
RETURN IF ( MONTH ( 'Date'[Date]) >= FYStartMonth,
MONTH ( 'Date'[Date] )- ( FYStartMonth -1 ),
12 + (MONTH ( 'Date'[Date] ) - (FYStartMonth -1 ) ) )Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
11 Replies
- parry2kSuper User
Anonymous I copied the code and it worked, I need to fix the double quotes. Can you copy DAX expression what you are using?
- v-xicaiCommunity Support
Hi Anonymous ,
You may need to change the syntax "– 1" to "-1" in your formula in English input format, then it will work well.
FYMonthNum =
VAR FYStartMonth = 4
//Update the fiscal year starting month above *Use number between 1 to 12
RETURN IF ( MONTH ( 'Date'[Date]) >= FYStartMonth,
MONTH ( 'Date'[Date] )- ( FYStartMonth -1 ),
12 + (MONTH ( 'Date'[Date] ) - (FYStartMonth -1 ) ) )Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-xicaiCommunity Support
Hi Anonymous ,
Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy