Replicating multiple Excel Calculations as rows of data - Beast Mode?

Hello,

I've got multiple datasets (actually customers) that we calculate a few things with separately. I was able to get all of the datasets (customers) combined so they could all be on one table:

Typically what I do in excel is from those numbers I'll pull a few different things out:

I'd like to basically mimic these calculations into domo and display them cleanly (likely a table). How would I go about writing a beast mode/formula for these?

  • Sum of Total margin for dataset (A, B, C) divided by 2
  • Sum of Total margin for dataset (A, B)
  • (Sum of Total margin for dataset (A, B, C) divided by 2) minus (Sum of Total margin for dataset (A, B) )

I believe this would be a CASE WHEN? But I'm not totally sure how to layer in the dataset conditions and the sum, divide, minus actions. For context I also have multiple other datasets beyond A, B, C - so that table is just filtered to those for display and I will end up doing very similar calculations on other datasets D, E, F, etc.

Thanks so much!

Answers

  • ColemenWilson
    edited March 30
    • Sum of Total margin for dataset (A, B, C) divided by 2:
      SUM(`Total Margin`) / 2
    • Sum of Total margin for dataset (A, B):
      SUM(CASE WHEN UPPER(`Dataset`) IN('A','B') THEN `Total Margin` ELSE 0 END)
    • (Sum of Total margin for dataset (A, B, C) divided by 2) minus (Sum of Total margin for dataset (A, B) )
      (SUM(`Total Margin`) / 2) - SUM(CASE WHEN UPPER(`Dataset`) IN('A','B') THEN `Total Margin` ELSE 0 END)

      You could also use Nested Beast Modes for this last one. It's as easy as referencing the newly created beastmodes in a new beastmode, something like:

      `Beastmode 1 Name` - `Beastmode 2 Name`

    If I solved your problem, please select "yes" above