how would I do show the total number of cases a company has that are not resolved in a calculated field?

I would like to show how many cases a company has got open that have not been resolved. I would like to show this in a calculated field inside of an account.

Parents
  • In the end what I did was add a field called status_number_c in the cases module that represented 0 if the case was closed and 1 if the case was not closed. This is the formula:

    ifElse(equal($status,"closed"),"0","1")

    I did not add this field into the cases layout.

    I then added another field into the accounts module that did a rollupSum of the status_number_c field ( the one I created above ). This is the formula:

    rollupSum($cases,"status_number_c")

    This will add up all of the status_number_c numbers so its still effectively counting the closed ones, however because if the status is set to closed the status_number_c value will be set to 0 the number will not change when the formula adds the closed cases to the total.

    I probably explained this really poorly but it took me less than 2 minutes to do once i'd thought of a way to do it. Hope it helps anyone else out!

Reply
  • In the end what I did was add a field called status_number_c in the cases module that represented 0 if the case was closed and 1 if the case was not closed. This is the formula:

    ifElse(equal($status,"closed"),"0","1")

    I did not add this field into the cases layout.

    I then added another field into the accounts module that did a rollupSum of the status_number_c field ( the one I created above ). This is the formula:

    rollupSum($cases,"status_number_c")

    This will add up all of the status_number_c numbers so its still effectively counting the closed ones, however because if the status is set to closed the status_number_c value will be set to 0 the number will not change when the formula adds the closed cases to the total.

    I probably explained this really poorly but it took me less than 2 minutes to do once i'd thought of a way to do it. Hope it helps anyone else out!

Children
No Data