Colm Tourque Posted June 13, 2006 Posted June 13, 2006 I have two tables employee and customer Linked on Emplyee ID. If I want to have a calculated field of all active customers how do I do this. I tried an if IF(CustomerStatus="active";Count(CustomerID);"0") But this gives me either all customers or a 0 but not the active customers. Any suggestions.
mz123 Posted June 13, 2006 Posted June 13, 2006 If you create a self join, you can use a Count() calculation: Please take a look at my sample file. Hope that helps : Test.fp7.zip
Newbies anagaby Posted June 13, 2006 Newbies Posted June 13, 2006 depending on how you have the database schema setup, if you have all the customer fields local to the customer table, I would try something like calculation=if(customerstatus="active";1;0) Summary field=sum(calculation) runing total.
Colm Tourque Posted June 13, 2006 Author Posted June 13, 2006 OK I get both ideas. Let me ask this then, because I think either idea would work, but the latter might be better in this situation. What if I am trying to on top of that also keep a count of some other things, say for instance I have a field in the cusomter table that keeps track of what date certain things are due for that customer. Say weekly sales call and I want to keep count of all the weekly sales calls for that customer. Could I do a calculation if(status="active" and weeklysalescall="incomplete"; 1;0) then a count field. how many ands can you run in an if?
Recommended Posts
This topic is 6800 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 accountSign in
Already have an account? Sign in here.
Sign In Now