gug Posted June 27, 2005 Posted June 27, 2005 I have a field called "paid by" everytime a customer comes i fill out what they used to pay, Cheque, Cash, MasterCard etc... is there any way to calculate how many people used MasterCard? (every record is one person). Thanxs for any help
Slobey Posted June 27, 2005 Posted June 27, 2005 Do you need to store this? If not a simple find on "Mastercard" will give you the number of records
gug Posted June 27, 2005 Author Posted June 27, 2005 Slobey, I was thinking about that originally. but the only problem is i have to do a seperate search for every payment type. which takes time. Queue here has posted exactly what i needed, thanxs. but now to add in something else. for every payment type there is a grand total. how would i determine the grand total made for each payment type. thanxs again
-Queue- Posted June 28, 2005 Posted June 28, 2005 Hmm. That part I have not quite worked out yet and am not having any luck with today.
-Queue- Posted June 28, 2005 Posted June 28, 2005 I was trying to complicate it more than that and have it work regardless of the found set. Although I guess if you separate the Paid Bys into their own table, you could make it much easier and just use one relationship and calc field for a report.
comment Posted June 28, 2005 Posted June 28, 2005 Oh, you want to ignore the found set? OK. sumByCategory.fp7.zip
-Queue- Posted June 28, 2005 Posted June 28, 2005 Duh on me. A Cartesian join makes it simple, although using a related summary field is screwing with my brain.
comment Posted June 28, 2005 Posted June 28, 2005 It actually has a sort of logic to it, if you stop to think about it. After all, what is a related set if not a kind of a found set? If the same summary can consider different found sets for each user/window, why not a related set as well? But I should point out that it is an undocumented feature.
-Queue- Posted June 28, 2005 Posted June 28, 2005 It does make sense. I am just accustomed to related summaries producing unexpected results in previous versions. I have also noticed some Get functions behaving similarly, e.g. using a related calculation involving Get(FoundCount) in place of Count(rel::serial) to count the number of records in a portal. Is this also undocumented or is it a purposeful feature?
comment Posted June 28, 2005 Posted June 28, 2005 Interesting. I didn't know that. Of course it's undocumented - the help says: "Returns a number that represents the number of records in the current found set." And a found set is: "The set of records in a table that are made active by a find request. When you find all records, the found set is the entire table." It would support the theory that the current object hierarchy places found and related sets in the same class, on which summaries and Get(FoundCount) operate. I suppose you've seen this?
-Queue- Posted June 29, 2005 Posted June 29, 2005 I had seen that, but did not have time to digest it then. Are you using this 'feature' frequently in your solutions now? Have you noticed any drawbacks to it? Both of these features would appear to greatly reduce file size. I hope they are not considered bugs or overlooked and removed in the future.
comment Posted June 29, 2005 Posted June 29, 2005 I'm being rather cautious for now. There are also some refresh issues. But it is very tempting. Curious what version 8 will reveal in this aspect.
Newbies BadLt Posted January 15, 2009 Newbies Posted January 15, 2009 I had a similar situation and this helped very much. One small problem, maybe you can help. I have a checkbox, and using your example I was able to display each value and how many times each was selected. However, I want to calculate a percentage for each value based on the number of records where the checkbox was actually utilized. To clarify, this is a survey with multiple checkboxes...not every checkbox is used on a particular survey. I may have 10 surveys, but a particular checkbox may only be answered on 8 of them. I created a calculation field "Case (IsEmpty (field);0;1)" to give a value to positive responses, then made a summary field to total those responses. Problem is that my field that calculates the percentage for each value will only work for the first value...all other values display a "?". Checkbox field Summary field = 8 Value A = 4 Percentage = 50% Value B = 2 Percentage = ? Value C = 1 Percentage = ? Any ideas? Thanks, BadLt
comment Posted January 15, 2009 Posted January 15, 2009 I'm afraid I don't quite follow - could you perhaps post a simple demo file?
Newbies BadLt Posted January 15, 2009 Newbies Posted January 15, 2009 Thanks for responding. I made a sample file...keep in mind that I'm not interested in surveys where the checkbox was not selected, which is why I created the "IsEmpty" Calculation field to tally positive responses and the summary field to total them. As you can see on the Results layout, only the first value in the checkbox was calculated. Thanks again BadLt_Test.zip
comment Posted January 15, 2009 Posted January 15, 2009 You must use the Extend() function when you refer to a non-repeating field in a repeating calculation field. BTW, I think you could make this a lot simpler. BadLt_Test.fp7.zip
Newbies BadLt Posted January 15, 2009 Newbies Posted January 15, 2009 That worked, thank you. BTW, I've found that everything I do on FM could be done simpler.
Newbies senorcoconut Posted May 9, 2009 Newbies Posted May 9, 2009 Hello! this example help me alot! but i still need to go further (just a little!) is it possible to do this... with 2 different fields and 2 different value list without duplicate the other fields? like this.... BadLt_Test_help.fp7.zip
Recommended Posts
This topic is 5736 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