Counting unique records based on criteria in report/form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harvir
    New Member
    • Apr 2020
    • 1

    Counting unique records based on criteria in report/form

    Hi
    I want to be able to count the unique records in a field based on criteria in another field. I know that to count with criteria, I can make a report and add a sum calculation to the control source. However, how do I count only the unique values?
    Thanks
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #2
    harvir,

    Welcome to Bytes!

    I think I understand what you are asking, but I not exactly sure.

    If you have a report, you can count unique entries by grouping according to those unique entries and add a running sum in the group header. But, I'm not sure that's exactly what you want to do either.

    If you have a Report Header/Footer, you could have a text box control that counts all records of a certain value:

    Code:
    =Sum(IIf([FieldName] = [whatever value], 1, 0))
    But I'm not sure that's what you want to do either.

    A few more details might be helpful for us.

    Not sure this hepps yet.

    Thanks.

    Comment

    Working...