Archive

Archive

Beastmode syntax for the following condition help

I am trying to do calculate a rate called Coverage Rate

 

Columns are Coverage and Dollar Amount

Values in Coverage column are either "Covered" or "Not Covered".

I want to know the total dollars for WHERE Coverage = Covered

that is easy, but if i wan to devide those total dollars where coverage = covered  by total dollars, how do i write that. 

= (SUM(`Dollars`) where `Coverage` = "Covered")  / sum(`Dollars`)

 

Comments

  • Contributor

    Hi @user07805

     

    BEAST MODE

     

    1. sum(
      case
      when `Coverage` = 'Covered' then `Dollars`
      else 0
      end
      )
      /
      nullif(sum(`Dollars`) ,0)

     

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