0 Replies Latest reply: Oct 9, 2014 4:26 AM by Ciro Gomez Parssian RSS

    Set analysis week problem

      Hi!

       

      I'd like to know how can i compare inventory vs sales  within a period of time. Stock income every Saturday and i have to compare last 9 days of sales (starting every saturday) against stock, red() if the stock is lower than that selection, green if it isnt.

       

      I have the solution if the income is on one day of the month, for example:

       

      Day 9 of every month and last 45 days.

       

      V_COMETA=DATE(DATE#(DATE(MAX(Fecha),'YYYYMM')&'29','YYYYMMDD'),'YYYY/MM/DD')

      V_COMETA_in=DATE(V_COMETA-45,'YYYY/MM/DD')

       

      The set in the chart is = if(Marca='COMETA', SUM({$<Mes=,Año=, Fecha={'>=$(V_COMETA_in)<=$(V_COMETA)'}>} CANT_SERVIDA_1 )

       

      This calculates between two dates.

       

      But my problem is when you have the Stock Income every saturday, not a day of the month.