Jasper Posted May 23, 2004 Posted May 23, 2004 A friend has a file that uses 50+ rows of just one field consisting of 5 radio buttons as shown below. Using fields F0-F4, I am tring to calculate the total number of entries for each radio button underneath the rows. I played around with this for some time using the Count function and various attributes, however, I either got a total of the number of rows or a zero. I could not discriminate between those buttons selected and those left blank. Any help would be greatly appreciated. Database: O0 - O1 - O2 - O3, O4 (O's represent buttons - 50 + rows of these same fields with unique names) ======================= Calculations: F0 - F1 - F2 - F3 - F4 Thanks, JESSE
RalphL Posted May 23, 2004 Posted May 23, 2004 "a file that uses 50+ rows of just one field consisting of 5 radio buttons" does not add up. Radio buttons only allow one value, thus out 250+ choices you could only pick one. I think what you have is 50+ fields represented by 5 radio buttons, or you have a repeating field of 50+ rows. Tell us what you have. The soution could be very simple or very complex.
ESpringer Posted May 23, 2004 Posted May 23, 2004 I think I understand: there are 50+ *records*, and each record has only one radio-button field, where the radio button enables a choice among 5 values. Right? Although you use radio buttons for data entry and display, the fact is that the contents of the field are really just the strings of text or numbers that your radio button shows. There's no special data type for radio buttons. So, you just want to be able to count how many of the records have "F0" in the main field, how many have "F1", etc. There might be various ways. But one easy way that I can generate off the cuff is: have five calculation fields "behind the scenes" for each record. The five calc fields each yield a NUMBER as a value. Suppose your main data field is called "MainField". Then the five calcs should be defined as: MainField="F0" MainField="F1" MainField="F2" MainField="F3" MainField="F4" Now, these are all efficient ways of saying, "IF the main field's value is F0, then give me a "1" here; if not give me a "0". You could use an "IF" or a "CASE" calc to do the same thing in a more cumbersome way. The point is, you'll get five fields that isolate your desired info in 1s and 0s. Now, define 5 summary fields. Each one offers a TOTAL of just one of the five calc fields. These are the tally calcs you want at the bottom of your report. Let us know whether this all makes sense to you...
Jasper Posted May 26, 2004 Author Posted May 26, 2004 YES, I have 50+ records of ONE field, each field with 5 Radio buttons. I'm amazed. I actually did get something to work on these records by using a COUNT and an IF statement in conjunction as shown below in five extra fields as one of you stated: IF( (BSI_01=0), Count(BSI_01),"") + IF( (BSI_02=0), Count(BSI_02),"") --- etc., etc. Actually this was fairly easy as I copied one formula, pasted it many times and the formulas lined up quite nicely so that I had little trouble changing the field names. After this I added another 5 fields for weighting the selections PLUS another for a grand total of all weighted factors. This may be a lengthy process - I'm NOT a whiz at this - but it works very well. I don't know if it would work on repeating fields or not, however, if someone has a problem with those they might try it out. Thanks much for responding! It helped with the brain block. JESSE
ESpringer Posted May 26, 2004 Posted May 26, 2004 Jesse, It seems to me you've got more complexity than you need, but I'm glad it's working for you!
Recommended Posts
This topic is 7586 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