DBT Parameter and variables

Hi,

I am struggling with this variable and cant figure out what is wrong. I am using dbt core with Databricks. The code works but when I put in a case statement it gives me an error stating missing token.

Blockquote
{% set StartDateIn = ‘2023-01-01’ %} – select start date
{% set EndDateIn = ‘2024-12-31’ %} – select end date
{% set FinStartDate = 4 %} – This is the Month of the start of the financial year Eg 4 = April
– {% set FinStartDateIncrement = 9 %}
{% set FinStartDateIncrement = case FinStartDate
when 1 then 12
when 2 then 11
when 3 then 10
when 4 then 9
when 5 then 8
when 6 then 7
when 7 then 6
when 8 then 5
when 9 then 4
when 10 then 3
when 11 then 2
when 12 then 1
else null
end %}

This is the error I get;

expected token ‘end of statement block’, got ‘FinStartDate’ line 10 {% set FinStartDateIncrement = case FinStartDate