3 Replies Latest reply: Apr 22, 2015 2:50 PM by Sunny Talwar RSS

    Sum Function using two different variables

      I'm attempting to use the Sum function apply two variables to arrive at an aggregated total.  I have created the following expression that will work correctly for the Max Date (12/31/2014)


      =Sum({$<[BROKER]={'BLKR'},[BS Date]={"$(=Date(Max([BS Date]),'MM/DD/YYYY'))"}>}[BALANCE])


      However, I need to aggregate a total based on dates from the previous two months (i.e. 11/28/2014 & 10/31/2014) using the following expressiosn:


      =Sum({$<[BROKER]={'BLKR'},[BS Date]={$Date={'10/31/2014'},'MM/DD/YYYY'"}>}[BALANCE])

      =Sum({$<[BROKER]={'BLKR'},[BS Date]={$Date={'11/28/2014'},'MM/DD/YYYY'"}>}[BALANCE])

      Does anyone have an idea on how to solve for this?