5 Replies Latest reply: Jun 16, 2016 2:27 AM by Shivam Sarin RSS

    avg of a measure after a certain date using set analysis

    Shivam Sarin

      Hi, I have two table which contains date. I have to compare if the dates in table 1< dates of table 2 . If the condition is true I need the average of SOH in table 2 till that date.

        

      Table 1                                        Table 2
      Column 1                                                               Column 2SOH
      12/1/20151/23/201684
      11/5/20151/24/2016474
      9/3/20151/25/2016425
      12/25/20151/26/2016319
      12/26/20151/27/201664
      12/27/20151/28/2016328
      12/28/20151/29/2016374
      12/29/20151/30/2016162
      12/30/20151/31/2016202
      12/31/20152/1/2016285
      1/1/20162/2/201621
      1/2/20162/3/201692

       

      So far when I'm trying to use set analysis or if statement I'm getting the below result

      Capture.PNG

       

      I need the average of SOH for dates greater than Stop buying date to current date. But I'm getting 0 values for it. Please help