Forum Discussion
Parameterize Fiscal Year
Hello,
I have been attempting to parameterize the fiscal year month start, but have had no luck. I am building a calendar table that determines the fiscal year as below. What I want to do is in 'VAR FiscalStartMonth = 8', add a parameter value in place of 8 so the use can select the fiscal start month. This does not seem to work as I get the following error "The optional argument of CALENDARAUTO function must be an integer between 1 and 12 inclusive."
So the calendarauto function is not accepting the selected parameter value (1-12) as an integer. Any thoughts or help on this would be greatly appreciated! Thanks.
Hi thrillhouse
Thanks for reaching out to us.
>>I get the following error "The optional argument of CALENDARAUTO function must be an integer between 1 and 12 inclusive."
Do not use addcolumns() to create a table. Addcolumns() will add calculated columns to the given table or table expression. ADDCOLUMNS function (DAX) - DAX | Microsoft Docs
Just try to use calendarauto() to create a table firstly, then add other columns to it
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-xiaotangCommunity Support
Hi thrillhouse
Thanks for reaching out to us.
>>I get the following error "The optional argument of CALENDARAUTO function must be an integer between 1 and 12 inclusive."
Do not use addcolumns() to create a table. Addcolumns() will add calculated columns to the given table or table expression. ADDCOLUMNS function (DAX) - DAX | Microsoft Docs
Just try to use calendarauto() to create a table firstly, then add other columns to it
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.