Adding extra budget condition in Beast Mode

PJG
PJG Member
edited March 2023 in Beast Mode

Hi team! This is my first post here, and I'm very new to this. I've built some incredible dashboards in Domo, but when it comes to code, I struggle a lot.

I have this simple Beast Mode working well (although it won't paste those funky apostrophes):

case
when Actual Costs > Planned Costs * 1.01 then 'Over Budget'
when Actual Costs < Planned Costs * 1.01 then 'Under Budget'
End

need to change the conditions a little to follow these rules:

  • <1% & > 20k = Over Budget
  • >1% & > 5k = Over Budget
  • else, Under Budget

How would I write this as code?

Thank you so much!

Best Answer

  • MichelleH
    MichelleH Coach
    Answer ✓

    Hi @PJG you could do something like this:

    case 
      when Actual Costs < Planned Costs*1.01 AND Actual Costs - Planned Costs > 20000 then 'Over Budget'
      when Actual Costs > Planned Costs*1.01 AND Actual Costs - Planned Costs > 5000 then 'Over Budget'
      else 'Under Budget'
    end
       
    

Answers

  • MichelleH
    MichelleH Coach
    Answer ✓

    Hi @PJG you could do something like this:

    case 
      when Actual Costs < Planned Costs*1.01 AND Actual Costs - Planned Costs > 20000 then 'Over Budget'
      when Actual Costs > Planned Costs*1.01 AND Actual Costs - Planned Costs > 5000 then 'Over Budget'
      else 'Under Budget'
    end
       
    

  • PJG
    PJG Member

    Wow, that reply was incredibly fast!!! And it works; thank you so much; I didn't realize it would be that simple!