6 Replies Latest reply on Dec 3, 2018 12:51 PM by Allison Mayer

    How to transform a one-to-many relationship into a one-to-one relationship based on value?

    Allison Mayer

      I am trying to create a calculated field to do the following:

       

      I have hosts with multiple IP addresses related to them.  What I need to do is create a statement that says: if any of the statuses contain Y then change all of the statuses to Y, sum the count of IP addresses, and group by host name.  Basically, if any of the statuses on the host are Y, then they are all Y.

       

      What I have:

       

      HostnameStatusCount of IP
      Host1Y7
      Maybe2
      N3
      Host2Y8
      N9
      Host3N8
      Maybe5
      Host4Y

      10

      Host5Y

      2

      N3

       

       

      What I need:

       

      Hostname
      Status
      Count of IP
      Host1Y12
      Host2Y17
      Host3N8
      Maybe5
      Host4Y10
      Host5Y5

       

      I think that I will need to use the fixed level of detail function, but I am not sure how to group Hostnames based on the value in the Status column.