5 Replies Latest reply: Feb 1, 2018 3:30 PM by Sunny Talwar RSS

    Bar Chart: Last 6 months from Max([Stop Arrival Date])

    Justin Dallas

      Hello Folks,


      I think I've outsmarted myself and I can't think my way out of this problem.  I have delivery stops, that have a field called [Stop Arrival Date].  What I would like, is that I have a Bar Chart that looks at the Max([Stop Arrival Date]) of the possible [Stop Arrival Date] (taking into account user selections) and then it shows 3 months back worth of data.


      Right now, the issue is that I have to Measure to take into account the selection of the Max([Stop Arrival Date]) but ignore the selection when bringing back data i.e when I click March it only brings back data for March, and not February and January.  Currently, I have the following.




      =If( [Stop Arrival DateTime] >
           date(interval(Max(Total [Stop Arrival DateTime]  - 120,'D'),'YYYY/MM/DD') ),
           StopMonth )




       SUM({1<IsEmpty={1},[Stop Arrival Date]= {'>=$(=date(Max(TOTAL [Stop Arrival Date]) - 120))'}>} stp_lgh_mileage)



      The output?  This mess right here with every month under the sun. Selection={Year = 2017, StopMonth = Mar}.





      Any help is greatly appreciated.