6 Replies Latest reply: Sep 10, 2013 8:50 AM by Steve Zagzebski RSS

    Set Analysis using Left function

    Steve Zagzebski

      My data sctucture:

      ProductInvoiced YearInvoiced YearMonthPaid YearMonthAmount
      A201220120120120225
      A201220120220120550
      A201220130320120675
      A2012201204201204100
      A2013201301201306125
      A2013201302201304150
      A2013201303201303175
      A2013201304201305200

       

      Current Object Expressions:

      Current Year Amount:

      =Sum ({$<[Incurred Year] = {$(=Max([Incurred Year]))}>}[Amount])

      Prior  Year Amount:

      '=Sum ({$<[Incurred Year] = {$(=Max([Incurred Year]-1))}>}[Amount])

       

      These expression work fine but I want to add the additonal filter for Paid Year just like I have it for Incurred Year in the expressions. However there is no Paid Year in the data so I am wondering how you can get the left 4 characters from the Paid YearMonth and then use it like is being used for the Incurred Year in the expressions above.