Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1054
  • Last Modified:

Trying to conditionally count a field and produce the total in the Page header.

I'm looking to run a count on a field {HazItem} which returns either true or false.  The count should be based on if the field value is true.  This total should be accessible in the page header.  I can get it to work correctly in the footer sections, but not in the header.  The problem is the value of this formula is needed in order to feed logic in another condition on the page header.  I know that the documents execution order is what's causing this problem, but surely there must be a workaround.

I've tried adding a formula in the details section:

if ({HazItem}=true) then {HazItem}

And then in another formula ran a count against it:

count({formula}) / count({formula}, {GROUP})
0
peterseychelles
Asked:
peterseychelles
  • 2
1 Solution
 
mlmccCommented:
Try this way

if ({HazItem}=true) then 1

Now use SUM instead of COUNT

sum({formula}) / sum({formula}, {GROUP})

mlmcc
0
 
peterseychellesAuthor Commented:
God, I can't believe I didn't think of that, I was so fixated on using the count function I hadn't considered doing it like that.  That does the trick, thanks mlmcc.
0
 
mlmccCommented:
Count just counts records so if you are trying to filter the rcords to count only some of them then you need to use a trick like that.  Count doesn't look at the value just that there is a recod.

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now