3 Replies Latest reply: Apr 12, 2017 2:47 PM by Bharath Janakarajan RSS

    Comparison of a value with the 1st value in each group

    Bharath Janakarajan
      CustomerProduct
      Product SortExposureExposure change
      C1P111000
      C1P22200100
      C1P33300200
      C1P44400300
      C2P1110000
      C2P22500-500
      C2P3320001000
      C2P4430002000

       

      Hello All, The above is a table in UI . Its hows the customer exposure by Product and the table is sorted based on product sort. I am trying to calculate the last column (Exposure change) in the Chart-Table. Exposure Change is calculated as exposure of the product- exposure of the 1st product within the customer group( P2-P1, P3-P1, P4-P1) within the customer group C1. The same logic applies to customer group C2 and so on.

      I tried the sum(Exposure)- Above(Sum(Exposure)) but I couldn't get the above function to get the first row. Also, the above function needs to get the first row within each customer group.   Really appreciate any thoughts or ideas to make this work in UI

       

      Thanks,

      Bharath