2

I would like to retrieve the amount of male/female participants of an event. So far I am able to retrieve the total amount of registered people. How can I get a number for the amount of male and female participants?

$result = civicrm_api3('Participant', 'getcount', array(
  'sequential' => 1,
  'event_id' => 66,
  'status_id' => array("Registered", "Pending from pay later", "Pending from incomplete transaction", "Partially paid", "Pending refund"),
  'options' => array('limit' => 9999),
));
  • Are you asking for any way to get the info or specifically how to do it from the API? – Allen Hutchison Jan 21 '16 at 22:09
1

It's not going to be answering your question, but did you look at civisualize? its latest version contains a visualisation for events, with a filter based on the gender...

| improve this answer | |
1

If I'm not mistaken, you can do that with an advanced search by simply selecting the correct event and the status being registered and then under demographics choosing the gender that you want

| improve this answer | |
0

Gender is a field available as a column on http://d46.demo.civicrm.org/civicrm/report/instance/25?reset=1 - so you could both show it, and filter by it. The later also lets you filter by 'not one of' 'male, female, transgender' in case you have contacts with no gender recorded

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.