5 Replies Latest reply on Jun 13, 2018 5:11 PM by Shinichiro Murakami

    Sum First Instance of a value and use in a calculation

    Chetan R

      Hello Friends,


      I've attached a workbook here. I am trying to calculate ratio here by dividing sum(Duration)/countd(Order Id). While I get the exact unique counts of Order Ids, SUM(Duration) is not giving the desired output. For numerator, ie Sum(Duration) I want the sum of only those records that appear at the first instance against each of the unique Order IDs, and not include for duplicate IDs. I was able to achieve this using index at a row level (used this article..How to sum ONLY the first instance of a value i've not included that in this workbook though), but when I use it at an aggregate level I find it difficult to get the desired output. Any help would be highly appreciated..