8 Replies Latest reply: May 13, 2015 1:25 PM by Sunny Talwar RSS

    Having problem with filter in sum

      Hi I'm having trouble with setting a filter in a SUM statement.  I'm defining a measure to always return a total amount for a specific month.  I'm trying to use the monthstart function within the measure definition but can't seem to get it right.

       

      If I have the measure defined like this it works:

      Sum ({$<[Invoice date]={"4/20/2015"}>}[Total Charge amount])

       

      But what I really want is to get the charges for the entire month of April so I changed it to this:

      Sum ({$<Monthstart([Invoice date])={"4/1/2015"}>}[Total Charge amount])

       

      But that gives me an error in the expression.  I can get rid of the error by doing this:

      Sum ({<$(Monthstart([Invoice date]))={"4/1/2015"}>}[Total Charge amount])

       

      But that returns no data.

       

      I verified what the values are after Monthstart is applied by modifying the dimension in a table and the values for April all show "4/1/2015"

       

      Thanks in advance for any help.