5 Replies Latest reply: Jul 4, 2012 6:57 AM by Richard Lucas RSS

    Set Analysis and variable date range

    Miguel Angel Baeyens de Arce

      Hello,

      I'm using

       

      Sum({<VTO_TIPO_VENCIMIENTO={'Cobros'}, VTO_TIPO -= {'Vto. Cobro Posterior'}, VTO_FECHA_VENCIMIENTO = {'<=$(vFechaReferencia1)'} >} IF(VTO_FECHA_VENCIMIENTO >= Date([Fecha Información Saldos]), VTO_DEUDA))


      and returns the results I want to get. But I was wondering if there is any other way to include all dates in between to get the Sum propertly only with Set Analysis, I mean, using Set Analysis to say "when VTO_FECHA_VENCIMIENTO BETWEEN vFechaReferecia AND [Fecha Información Saldos]".

      I've tried

       

      Sum({<VTO_TIPO_VENCIMIENTO={'Cobros'}, VTO_TIPO -= {'Vto. Cobro Posterior'}, VTO_FECHA_VENCIMIENTO = {'<=$(vFechaReferencia1)>=$(#=Date([Fecha Información Saldos]))'} >} VTO_DEUDA))


      but it doesn't seem to work (returns different results).

      Maybe the above code is correct and properly formatted for best performance in QlikView?

      Thanks in advance!