7 Replies Latest reply: Jan 4, 2018 5:40 PM by omar bensalem RSS

    Expression pivot table

    Alex Valverde

      Good afternoon, colleagues

      I need your advice,

      I have problems with an expression with double validation that does not show the expected result, I detail it at the end:

       

      This expression works well, shows sales below 90% compared to the previous year

      =Sum( { < Nomb_Almacen = { '=Sum({<Año={$(v_AñoAct)}>} Venta_Neta) < (sum({<Año={$(v_AñoAnt)}>} Venta_Neta)*.90)' } >}Venta_Neta/1000 )

      is displayed correctly in the pivot table:

      Captura de pantalla 2018-01-04 12.16.00.png

       

      This expression also works well, showing sales per store greater than 100% compared to the previous year.

      =Sum( { < Nomb_Almacen = { '=Sum({<Año={$(v_AñoAct)}>} Venta_Neta) >= sum({<Año={$(v_AñoAnt)}>} Venta_Neta)' } > } Venta_Neta/1000 )

      is displayed correctly in the pivot table:

      Captura de pantalla 2018-01-04 12.21.59.png


      This is the expression with which I have problems and I need help:

       

      =( Sum({<Año={$(v_AñoAct)}>}Venta_Neta) -

         Sum( { < Nomb_Almacen = { '=Sum({<Año={$(v_AñoAct)}>} Venta_Neta) < (sum({<Año={$(v_AñoAnt)}>} Venta_Neta)*.90)' } > } Venta_Neta ) -

         sum( { < Nomb_Almacen = { '=Sum({<Año={$(v_AñoAct)}>} Venta_Neta) >= sum({<Año={$(v_AñoAnt)}>} Venta_Neta)' } > } Venta_Neta )

      )

       

      This Expression in addition to the warehouses that are between 91% and 99% with respect to the sales of the previous year, brings me warehouses with zero and negative values and I do not know how to eliminate them.

      Captura de pantalla 2018-01-04 14.10.10.png