Ifelse with startwith

I am trying to write the below query from tableau to quicksight:
IF [ekr_sev] > 2 THEN
IF STARTSWITH([EKR Root ], ‘HIE’) THEN ‘HIE’
ELSEIF STARTSWITH([EKR Root ], ‘CIE’) OR STARTSWITH([EKR Root], ‘CIM’) THEN ‘CIE’
ELSE ‘Se3’
END
F STARTSWITH([EKR Root ], ‘HIE’) THEN ‘HIE’
ELSEIF STARTSWITH([EKR Root ], ‘CIE’) OR STARTSWITH([EKR Root], ‘CIM’) THEN ‘CIE’
ELSE ‘Se2’
END

Tried reformatting to quicksight but getting ‘The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again.’ Am new to QS

@Made_Enny Do you want to translate that into quicksight, And when you tried, you got the syntax error; Is that accurate?

If Yes, the Syntax error must have some hint in it… more detail certainly help others to help you…

Hi @Made_Enny - Welcome to AWS QuickSight community and thanks for posting the question. I will suggest to check the documentation of “if else” of QuickSight and try to replicate it. See the link below - Ifelse - Amazon QuickSight.

I agree with @neelay , share the error details so that community can help in fixing the error.

Regards - Sanjeeb