Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Number of occurances of a certain value in a field Post Reply Post New Topic
Author Message
zensunni
Newbie
Newbie


Joined: 15 Sep 2008
Online Status: Offline
Posts: 1
Quote zensunni Replybullet Topic: Number of occurances of a certain value in a field
    Posted: 15 Sep 2008 at 4:11pm
I have a database field with values 0-5. I want to show a percentage and/or count of how many times a particular value occured for the field.
 
How can I do this?
 
A simpler example: Say we have a field called gender. How do I find out how many "M" values are in that field?
 
Thanks for any help!
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 16 Sep 2008 at 1:47am
Hi,
 
Use the formula below
 
len({Table.Stringfield}) - len(replace({Table.StringField},'M',''))
 
Cheers
Rahul
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.