Jump to content

Conditional Sum(if)


This topic is 5777 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm trying to create a conditional sum but I'm having difficulty with the calculation.

I have an Administration layout that gives a company overview by a variety of calculation fields.

I have work orders recurring by month for multiple route men. Each month has a different grand total value due to the following conditions: number of tickets, number of call backs and number of one timers.

I want to sum the total ticket value of the current month, omit the call backs and one timers and return the result to a portal field.

I know I can write a script to sort the records omitting the conditionals to return a value, but I'd rather use a calculation so that my other calculations are not skewed by the sort.

Your input would be much appreciated.

Thanks

Link to comment
Share on other sites

I have a way to do this, but it is not fun.

There are two steps:

1. Create a calculation field that says: if ( isblank (Tickets) ; "" ; "1")

This is assuming you have separate fields for tickets, call backs and one timers. If that is not the case and you use a dropdown for these Types, just use "if ( type = "tickets" ; "1" ; "" ) where "type" is the name of the field with the dropdown.

2. Then create at summary field that counts the calculation field above.

Repeat the steps above for call backs and one timers

Then, put the summary fields in the footer.

I hide the calculation fields behind the field they are calculating.

I hope that helps.

Link to comment
Share on other sites

1. Create a calculation field that says: if ( isblank (Tickets) ; "" ; "1")

Hmm, "isblank" eh? Is that in the Santa Monica version of FileMaker? :)

Assuming you mean isempty, you could simplify that to:

not isempty(Tickets)

Link to comment
Share on other sites

This topic is 5777 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.