Jump to content

Get count based on field with Value List


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Newbies

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6315 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
×
×
  • Create New...

Important Information

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