Reputation: 2475
I want to create a measure in PowerBI for fiscal year. I am starting with PowerBI, so my experience is very limited.
This gives a syntax error:
FiscalYear_ = IF(MONTH(NOW()) <= 9, YEAR(NOW()); YEAR(NOW()) + 1)
What am I doing wrong here?
Thanks a lot for your help!
KR M
Upvotes: 0
Views: 96
Reputation: 13450
Because in some locales comma is used as decimal separator, parameters separator in functions sometimes is not comma (,), but semicolon (;). This depends on your regional settings. But in your example, you mixed both separator types - there is a comma after 9
and semicolon after "value if true" parameter. You should fix the wrong one and the measure to be either:
FiscalYear_ = IF(MONTH(NOW()) <= 9, YEAR(NOW()), YEAR(NOW()) + 1)
or
FiscalYear_ = IF(MONTH(NOW()) <= 9; YEAR(NOW()); YEAR(NOW()) + 1)
Upvotes: 1