Struggling with Beastmode formula

For some reason, the following BM formula is not working. I get a Calculation Error: This calculation contained a syntax error.

Can anyone advise on what I'm doing wrong here?


sum(case when `EVENT_NAME` like 'user_engagement' then `EVENT_PARAMS_ENGAGEMENT_TIME_SEC` end)

/

COUNT(DISTINCT case when `EVENT_NAME` like 'user_engagement' then `Unique Session ID` end)

end

Best Answers

  • MichelleH
    MichelleH 🟣
    Answer ✓

    Hi @NathanDorsch try removing the last "end" and see if that resolves the error.

  • RobSomers
    RobSomers 🟢
    edited August 10 Answer ✓

    @NathanDorsch You don't need your final "end". You only need an end when you're dealing with individual CASE WHEN statements.

    **Was this post helpful? Click Agree or Like below**

    **Did this solve your problem? Accept it as a solution!**