Variables

Variables

Variables as Checkbox - Unimplemented Error

Hi All,

Love these forums! Anyways.
I created a beast mode calculation that takes into consideration my Campaign Metrics variable values.

CASE WHEN Campaign Metrics = 'A' THEN (…)
WHEN Campaign Metrics = B THEN (…)
ETC…

If I try to change the variable's control type [from a dropdown] into a checkbox selector [which allows multiple selections], DOMO returns the following error —>


I tried changing the beast mode to account for multiple selections, but still received the same error. For ex —>

CASE WHEN Campaign Metrics = 'A' and Campaign Metrics = 'B' THEN(…


I cannot even find an example online of people using checkboxes for variables. Any help is very much appreciated!

Tagged:

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Answers

  • @emmanuel_fabre Can you please share your beast mode code and some more information about how you are using it in your card?

  • Beast Mode —>
    `CASE WHEN Campaign Metrics = 'Clicks - CTR' THEN(

    (SUM(CASE WHEN Post Date IS NOT NULL THEN 1 ELSE 0 END)

    • SUM(CASE WHEN a IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN b IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN Total c IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN CONCAT( d ,' ', e) !='string' AND CONCAT( d ,' ', e ) !='string2' AND f IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string3' AND g IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string3' AND g IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string3' AND g IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'twitch' AND g IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN Total Production Followers IS NOT NULL THEN 1 ELSE 0 END)
      )
      /

      )
      )
      WHEN Campaign Metrics = 'Engagement Rate' THEN(
      (SUM(CASE WHEN Post Date IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN a IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN CONCAT( d,' ', e ) !='string4' AND CONCAT( `d` ,' ', e ) !='string5' AND Total c IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN Total Production Followers IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string4' AND i IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string4' AND j IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string4' AND k IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string4' AND l IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN ifnull(((Total m)+( k)+( l ))/( Total c),0) > 0 THEN 1 ELSE 0 END)
      )
      /
      (
      )
      )
    • SUM(CASE WHEN Post Date IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN a IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN CONCAT( d,' ', e ) !='string4' AND CONCAT( `d` ,' ', e ) !='string5' AND Total c IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN Total Production Followers IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN d = 'string4' AND i IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN d = 'string4' AND j IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN d = 'string4' AND k IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN d = 'string4' AND l IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN ifnull(((Total m)+( k)+( l ))/( Total c),0) > 0 THEN 1 ELSE 1 END)

    WHEN Campaign Metrics = 'Views' THEN(

    (SUM(CASE WHEN Post Date IS NOT NULL THEN 1 ELSE 0 END)

    • SUM(CASE WHEN a IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN CONCAT( d ,' ', e) !='instagram photo' AND CONCAT( d,' ', e) !='twitch stream' AND Total c IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN d = 'string4' AND i IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN production_type = 'string4' AND j IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN production_type = 'string4' AND k IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN production_type = 'string4' AND l IS NOT NULL THEN 1 ELSE 0 END)
    • SUM(CASE WHEN Total Production Followers IS NOT NULL THEN 1 ELSE 0 END)
      )
      /
      (SUM(CASE WHEN Post Date IS NOT NULL THEN 1 ELSE 1 END)
      )
      )
      END
    • SUM(CASE WHEN a IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN CONCAT( d ,' ', e) !='instagram photo' AND CONCAT( d,' ', e) !='twitch stream' AND Total c IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN d = 'string4' AND i IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN production_type = 'string4' AND j IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN production_type = 'string4' AND k IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN production_type = 'string4' AND l IS NOT NULL THEN 1 ELSE 1 END)
    • SUM(CASE WHEN Total Production Followers IS NOT NULL THEN 1 ELSE 1 END)
  • edited June 2023

    I am using it to display one percentage value in a 'Filled Guage' chart. It works fine as a dropdown, but not as a checkbox

    @MichelleH Thanks, by the way!

  • @emmanuel_fabre How should the percentage value behave when multiple values are selected? For example if "Clicks - CTR" = 95% and "Engagement Rate" = 50%, what should the single percentage be and what does that mean?

  • @MichelleH

    In a recent iteration of my beast mode, I included a CASE WHEN Campaign Metrics = "Clicks - CTR" AND Campaign Metrics = "Engagement Rate" THEN(…

    I believe I created a case statement for each possible 'combo', but I am doubting myself as I type this. I am going to try to recreate every combo in a new beast calc, and see where that goes

  • @MichelleH.

    I just updated the beast mode to include all [7] possible combos—
    Eng Rate
    CTR
    Views
    Eng Rate + CTR
    Eng Rate + Views
    Eng Rate + CTR + Views
    Views + CTR


    It still errors out only when selecting checkbox

  • @emmanuel_fabre Can you please explain the business logic of the calculation? I see some opportunity to simplify your original beast mode in a way that could resolve the errors, but need more details to be able to provide input

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In