3 Replies Latest reply on Aug 28, 2016 6:23 PM by Trần Ngọc Sơn

    How to sum Sales with conditional Order Date < Date( create by paramter)

    Trần Ngọc Sơn

      Hi all,


      I caclculate sum Sales for 3 month that Date create by parameter.


      I have 2 parameter ( parameter Year, parameter Month with data type is Interger), i create calculation to convert parameter to date:

        Date Start: DATEADD('month',-2,date(str([month])+"/01/"+str([year])))

        Date end: DATEADD('month',0,date(str([month])+"/01/"+str([year])))


      Sales condition:

           if attr([Order Date])>= [Date start]

           and attr([Order Date])<= [Date end]

           then sum([Sales]) END


      The calculation Sales condition don't wrong but it's Null,


      How to sum Sales with period time create by parameter?


      I attach file workbook i do. But it's wrong.