PaddyO Posted December 29, 2006 Posted December 29, 2006 I need to find out how many records have the value "Walk In" or "Repeat Customer" in my T_GuestType field that is populated by a custom value list. The goal is to produce my salesperson report and show how many transactions came from walk in guests and so forth based on the values in the Guest Type field. This is a Count [color:blue]( Transactions::T_GuestType ) function is it not? Only, how do I get the calc to sort out the items in the field and then return a count based on that info? I tried this with no reward... [color:blue]Count ( Transactions::T_GuestType )= "Walk In" Do I need to do a Case calc? Appreciate the help. PF
Søren Dyhr Posted December 29, 2006 Posted December 29, 2006 In reports do you not use Count( but instead Summary-fields, if you need a live figure however will Count( something give you a figure pretty fast, but it scales badly when Counting over say 300000 records does it get slow as molasses. I think I the later, would reformat the field to a boolean representation of a numberfield or a checkbox field with only one value, this will abbreviate the required indexing considerably. --sd
Søren Dyhr Posted December 29, 2006 Posted December 29, 2006 Something is amis since I'm cut away from editing my own posts, except within a apparent short notice of a splitsecond or such so I have then made you a tiny template to illustate how I would use Count( if summaries are unlikely to fit the bill??? --sd examplefile.zip
PaddyO Posted December 29, 2006 Author Posted December 29, 2006 Søren, So, it is better to use summary. If I were to use summary I would need to change the field to a radio button set, is that correct? Thank you
Søren Dyhr Posted December 29, 2006 Posted December 29, 2006 No if you chose summaries could any fieldvalue be a breaker value, just remember to sort on the breaker value at least. --sd
PaddyO Posted December 29, 2006 Author Posted December 29, 2006 Breaker Value? I am not sure of that terminology. PF
Søren Dyhr Posted December 29, 2006 Posted December 29, 2006 Breaker value or group by ...try to see how to accomplish it with summaries as well. --sd examplefil2.zip
PaddyO Posted December 29, 2006 Author Posted December 29, 2006 Søren, Thank you so much. I very much appreciate your help! I think that example shows me just the right steps I am needing to take. Heldig Nytår, PF
Newbies ViaSail Posted January 4, 2007 Newbies Posted January 4, 2007 I was interested in the same thing, so thanks for this post. I however, was looking for a solution where the Customertype can take more than two values. Basically, what I want is to create a histogram of the number of times a certain value from a list is used in a field. Any help will be appreciated. MD
PaddyO Posted January 4, 2007 Author Posted January 4, 2007 That is a good one. I'm not exactly sure since I am very new to this. Having said that, I decided to parse the data out into individual fields that I can then count individually. So, if there are 4 items there are now 4 calc fields that have case functions. Basically they say "if this field says 'Walk In" then create a 1, otherwise do nothing." Then I created a summary field to count the fields with a one in them producing a total count of "Walk In" customers. You could probably use the same methodology. Essentially, you just want to know how many records have the value you are looking for. Soren has some exaples here that looked pretty good to me but I din't have the time to fully tear them apart before I had to launch my project. I will probably revert to a method he suggested in a revision of the project, when I get a little smarter... PF
Recommended Posts
This topic is 6869 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