14 Replies Latest reply: Apr 19, 2017 6:39 AM by Stefan Piskorski RSS

    Week To Date issue - what is missing?

    Stefan Piskorski

      I am using the calendar that the source data uses, which is:

      year, quarter, month_no_id, week_no_id, calendar_date (datetime) and have added date_id, week, month_no, monthName and day .


      For a given selection of year, month_no, week_no and day:


      =sum({$< day = {$(#=Only(day ))},week_no_id=, month_no_id=>} sales )                works correctly



      =Sum({<Year=, Month=, Quarter=, Week_no=, day=, date_id={'>=$(=Num(MonthsStart(Max(date_id))))<=$(=Max(date_id))'}>} sales)           


      also works correctly to give the Month to date.




      =Sum({<Year=, Month=, Quarter=, Week_no=, day=,  date_id={">=$(=Num(WeekStart(Max(date_id))))<=$(=Max(date_id))"}>} sales)  


      does not give the correct figure.


      Also, changing the "Year="   to "year=" gives a different result.


      What am I missing here?