I came up with this
,case
when ci_month between INTNX('MONTH',TODAY(),0,'B') and INTNX('MONTH',TODAY(),0,'E') then 1
when ci_month between INTNX('MONTH',TODAY(),1,'B') and INTNX('MONTH',TODAY(),1,'E') then 2
when ci_month between INTNX('MONTH',TODAY(),2,'B') and INTNX('MONTH',TODAY(),2,'E') then 3
when ci_month between INTNX('MONTH',TODAY(),3,'B') and INTNX('MONTH',TODAY(),3,'E') then 4
when ci_month between INTNX('MONTH',TODAY(),4,'B') and INTNX('MONTH',TODAY(),4,'E') then 5
when ci_month between INTNX('MONTH',TODAY(),5,'B') and INTNX('MONTH',TODAY(),5,'E') then 6
else 0 end as mth_lst
... View more