Struggling with Beastmode formula

Options

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 Coach
    Answer ✓
    Options

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

  • RobSomers
    RobSomers Coach
    edited August 2022 Answer ✓
    Options

    @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!**

Answers

  • MichelleH
    MichelleH Coach
    Answer ✓
    Options

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

  • RobSomers
    RobSomers Coach
    edited August 2022 Answer ✓
    Options

    @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!**