2 Replies Latest reply: Feb 24, 2015 1:02 PM by Juan Vidal Gil RSS

    Compare indicator of two dimension values

    Juan Vidal Gil

      Hi,

       

      I am a begginer in Qlickview and I am trying to make a comparision using expresions.

       

      I have the next table:

       

      LOAD * INLINE [

      cod_periodo, hc_consumo

      201401, 50

      201402, 40

      201403, 60

      201404, 54

      201405, 66

      201406, 62

      201407, 60

      201408, 56

      201409, 54

      201410, 56

      201411, 61

      201412, 65

      ...

      ....

      ];

       

      I have a very simple graphic. Dimension=cod_periodo, indicator=hc_consumo.

      I want to have a second indicator that compare one period with the previous one

      indicador = (hc_consumo(cod_periodo) - hc_consumo(cod_periodo-1))/hc_consumo(cod_periodo)

       

      Can I use some expresion?

      Do I have to create a new field in the scripts used to load data?

       

      Any advice will be greatly apreciatted.

       

      I know that 201401 - 1 = 201400 and I have a problem if I am not using dates, but that is anothjer problem.Now I just want to know

      how to do a simple comparision.

       

      Thanks.