3 Replies Latest reply: Aug 23, 2017 11:25 AM by Gordon Haines RSS

    Newb needs help - variables and dates in expressions

    Gordon Haines

      Quick information: InvDate and Qty come from an Excel spreadsheet which is loaded. Date is in MM/DD/YYYY format, quantity is an integer. RealDate comes from MasterCalendar script. A KPI with the expression of max(RealDate) or min(RealDate) display the correct dates.

       

      I have created a KPI where I am trying to get the inventory for the start and end of the selected date range. When using Sum({$<[InvDate] = {'08/20/2017'}>}Qty) I get the correct information in the KPI.

       

      What I really need, however, is the information to update based on the dates selected. So I tried Sum({$<[InvDate] = {"Date(max(RealDate),'MM/DD/YYYY')"}>}Qty) but I get 0.

       

      I also tried Sum({$<[InvDate] = {"Date($(vMaxRealDate),'MM/DD/YYYY')"}>}Qty) where vMaxRealDate is a variable of Max(RealDate). This also gets me a result of 0.

       

      Please help, as this is the big thing holding me back from finishing an important project for the company.

       

      Thanks in advance.