1 Reply Latest reply: Jul 14, 2017 7:11 AM by Sunny Talwar RSS

    Difference and variance formulas in KPI

    Joaquin Nieto Cruz

      Hello, im incorporating in the subtitle and footnote of a KPI (that is comparing the sell of units between one year and another) the difference (quantity) and variance (% change) of the two figures presented. Im using the next formulas to calculate difference and variance, but unfortunately they are not working:


      ='DIF = '& NUM((NUM(Median({$<AÑO={$(=max([AÑO]))}>}[Margen VI]),'#')-NUM(Median({$<AÑO={$(=max([AÑO])-1)}>}[Margen VI]),'#')),'#,#0')



      ='VARIACIÓN = '& NUM((([MARGEN 4 N]-[MARGEN 4 N-1])/[MARGEN 4 N-1]),'#,#%')


      If anyone could help me regarding this issue I will really appreciated as im knew in Qlik Sense.