3 Replies Latest reply on Aug 18, 2016 5:31 AM by Mahfooj Khan

    Picking the last non null value

    Himanshu Raunak

      Hi Everyone,

       

      Posting my first question on the community and looking forward for some help from all you heavy hitters out there!

       

      I have a table in the following format:

       

      Month
      CategoryMetric
      Jan-16A10
      Feb-16A20
      Jan-16B5
      Feb-16B7

      Jan-16

      C1
      Feb-16C2

       

      I want to report these numbers at a Quarterly level. The catch is that the quarter numbers should represent the last reported month's numbers. In this case, for Quarter 1, the numbers should be that of Feb, A=20, B=7 and C=2. One way would be to create 3 calculated fields, one for each month (Jan, Feb and Mar) and go the ISNULL way. But this would require me to add new calculated field every month, Can anyone please suggest an alternate method.

       

      Any help would be much appreciated!