This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Report Counting Different Entries in a Field

FormerMember
FormerMember

I have a custom property called Building. I'm trying to inventory quickly how many buildings we have. When I use the Count function on the Building property it gives me a total of all nodes who have the property defined. Is there a way to count "unique" entries in the property. I have multiple switches per building, and this is just giving me the total count of devices with the property defined.

  • You can simply select the entire collumn and then copy and paste the contents into Excel then remove the duplicates. This will give you a count of all the buildings.

  • FormerMember
    0 FormerMember in reply to mmelton

    I have been able to get  it without duplicates by adding the Building property, and then adding it again with the Count function. This basically gives me a device count per building. If I could only get a total row count as a total building count then I'd be golden.

    I was hoping to get this done directly on the report so I can point other people to it, but copying into Excel is still better than manually counting rows on 8 pages of the report.

  • Try this.

    Change your report to a SQL Report and enter in this (assuming Building is the actual custom property name)

    Select Building,COUNT (Distinct NodeID) as TotalDevices

    From Nodes

    Group by Building

  • FormerMember
    0 FormerMember in reply to mdriskell

    Mike, your SQL query was returning the same results as my above standard Report, but it did get me thinking:

    Select COUNT (Distinct Building) as UniqueBuildings

    From Nodes

    Was what I was looking for. Thanks for pointing me in the right direction!

  • Sorry I thought you were wanting devices per buildings....not distinct building....Misunderstood...but glad to help regardless.