4 Replies Latest reply on Aug 22, 2018 2:29 AM by jekaterina tint

    Sum of measure from second data source between dates from first source

    jekaterina tint

      Hi everyone!

       

      I have two tables from Excel. One with sales data and the other one with promotion data (incl promotion start and end date).

       

      I am trying to create a measure with the sum of the sales within the promotion period (Measure: Vol for period). Following this thread (calculating sum of a measure between two dates without "between" Operator??)  I have created an IF-THEN measure, but currently, it gives the result as null and I cannot figure out why.

       

       

      The calculated measure not giving the result is=

      IF ATTR([sales (data)].[Date]) >= MIN([Start date])

      AND ATTR([sales (data)].[Date]) <= MAX([End date])

      THEN SUM([sales (data)].[Volume])

      END

       

      Any help would be highly appreciated. Thanks!