Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get count based on field with Value List

Featured Replies

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

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

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

  • Author

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

No if you chose summaries could any fieldvalue be a breaker value, just remember to sort on the breaker value at least.

--sd

  • Author

Breaker Value? I am not sure of that terminology.

PF

Breaker value or group by ...try to see how to accomplish it with summaries as well.

--sd

examplefil2.zip

  • Author

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

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

  • Author

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.