AnsweredAssumed Answered

Count records in related table with a specific value.

Question asked by JamesAllen on Feb 24, 2014
Latest reply on Feb 24, 2014 by philmodjunk

Title

Count records in related table with a specific value.

Post

     I need to count records in related table where the value of a specific field has a specific value.

     I have a customer table that has the total number of 200 ML bottles and 375 ML bottles (separate fields)

     I have transactions that have a field (Bot) with different bottle discriptions/values i.e. 200 ML, 375 ML etc.

     I want to count the number of 200 ML bottles/records, in the transaction table for a given customer.

     I am trying to use a calculation field "Customer ::Total 200 ML Bottles" = If (InvDetail::Bot = "200 ML" ; Count ( InvDetail::Bot ) ; 0)

     I don't seem to be getting the correct number.  It is counting records with the "200 ML" but also fields that are zero.

Outcomes