### Title

Let Function Error - "List usage is not allowed in this calculation"

### Post

Since I couldn't find a way to have FMP 13 easily tell me which week of the month it is (1, 2, 3, or 4), I decided to just create a LET function to do a rough approximation based on the Day of the month (if DayOfMonth ≤ 7, then 1, etc.).

However, when trying to start the very simplest Let function, I immediately ran into a confusing error. Regardless of which of the two variables below are uncommented, I get the error "List usage is not allowed in this calculation" when I try to save the code -- see screenshot attached.

The syntax seems straightforward for the Let function so I'm wondering why it's failing.

Let

(

[

// multiplier = 0;

dayOfMonth=Day(Get(CurrentDate));

];

// Calculation below to create week multiplier

// calc here….

)

I've also tried creating a simple calculation to return, but that didn't make any difference: same "list" error.

So, what's going on?

Thanks in advance for suggestions.

- m

It is because the last line (with text, in the List) which is not turned off ends with ; , then has the ];

The last of this kind of List (ends with ]; ) doesn't need that ; , as it's the one in ];

The above problem often happens if you're turning on and off lines in a List()