<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Variation between currently years and month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708296#M54341</link>
    <description>&lt;P&gt;Thank you so much &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28676"&gt;@fosuzuki&lt;/a&gt;&amp;nbsp;!!&lt;/P&gt;&lt;P&gt;That is working! I thought about it but didn't know how to do it ...&lt;/P&gt;&lt;P&gt;Now in the KPI it is perfect, but how do you use this in the bar chart when my dimension&amp;nbsp; is&amp;nbsp; Years (2016, 2017, 2018, 2019, 2020) if used the same sentence only can see the currently year vs the last year&amp;nbsp; (imagen attached&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Before I used&amp;nbsp;=Num((SUM(Qty)/above(SUM(Qty)))-1,'#.##0%')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lucimar_0-1591289246706.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34965iF4AA501CDA6CDE74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lucimar_0-1591289246706.png" alt="Lucimar_0-1591289246706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanksss!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 16:50:38 GMT</pubDate>
    <dc:creator>Lucimar</dc:creator>
    <dc:date>2020-06-04T16:50:38Z</dc:date>
    <item>
      <title>Variation between currently years and month</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1707923#M54318</link>
      <description>&lt;P&gt;Hello community! I need your help.&lt;/P&gt;&lt;P&gt;I am working on a dashboard in Qlik Sense and I have a little problem. I need to calculate the variation between the current year and month (2020 / May) and the same year and month of last year (2019 / May).&lt;/P&gt;&lt;P&gt;Actually, I managed to do it annually with this sentence and creating two functions for the current year and the previous year (vAnoActual = max (year) and vAnoAnterior = vAnoActual -1):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;= Num((SUM({&amp;lt;[Year]={'$(&lt;EM&gt;vAnoActual&lt;/EM&gt;)'}&amp;gt;}Qty)/ SUM({&amp;lt;[Year]={'$(&lt;EM&gt;vAnoAnterior&lt;/EM&gt;)'}&amp;gt;} Qty))-1,'#.##0%')&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the bar graph I used: = Num ((SUM (Qty) / above (SUM (Qty))) - 1, '#. ## 0%') and that works perfectly less when I want to see the current year and month current.&lt;/P&gt;&lt;P&gt;It is not analytically correct to compare a full year (12 months) vs. current year (5 months)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lucimar_0-1591205663511.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34899iBBDFFBBAD9E1B9E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lucimar_0-1591205663511.png" alt="Lucimar_0-1591205663511.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, when I change the dimension from years to months I have no problem using the ABOVE function. My problem is with the KPI, and when the dimension is YEAR (Imagen attached).&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any suggestions please let me know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;______________________&lt;/P&gt;&lt;P&gt;Hola comunidad! Necesito tu ayuda.&lt;/P&gt;&lt;P&gt;Estoy trabajando en un Dashboard de&amp;nbsp; Qlik Sense y tengo un pequeño problema. Necesito calcular la variación entre el año y el mes actual (2020 / mayo) y el mismo año y mes del año pasado (2019 / mayo) para mostrarlo en un KPI.&lt;/P&gt;&lt;P&gt;En realidad, logré hacerlo anualmente con esta oración para la cual creé dos funciones para el año actual y el año anterior (vAnoActual = max (año) y vAnoAnterior = vAnoActual -1):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;= Num ((SUM ({&amp;lt;[Año] = {'$ (vAnoActual)'}&amp;gt;} Cant) / SUM ({&amp;lt;[Año] = {'$ (vAnoAnterior)'}&amp;gt;} Cant)) - 1, ' #. ## 0% ')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;En el gráfico de barras utilicé: = Num ((SUM (Cant) / above (SUM (Cant))) - 1, '#. ## 0%') y eso funciona perfecto menos cuando quiero ver el año actual y mes actual vs el año anterior y mismo mes que el actual.&lt;/P&gt;&lt;P&gt;Mi problema es que no es analíticamente correcto comparar un año completo (12 meses) con el año actual (5 meses)&lt;/P&gt;&lt;P&gt;Cuando cambio la dimensión de años a meses,no tengo problemas para usar la función ABOVE. Mi problema es con el KPI, y cuando la dimensión es AÑO (Imagen adjunta).&lt;/P&gt;&lt;P&gt;Sí tiene alguna sugerencia, por favor hazme saber.&lt;/P&gt;&lt;P&gt;¡¡¡Gracias!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 17:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1707923#M54318</guid>
      <dc:creator>Lucimar</dc:creator>
      <dc:date>2020-06-03T17:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Variation between currently years and month</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708094#M54326</link>
      <description>&lt;P&gt;One approach is to add the month filter in the Set Analysis.&lt;/P&gt;&lt;P&gt;Create a variable:&lt;/P&gt;&lt;P&gt;vMesActual = num(max({&amp;lt;[Year]={'$(vAnoActual)'}&amp;gt;} Month))&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//variable to get the max month for current year&lt;/P&gt;&lt;P&gt;Then adjust your expression, adding a set analysis to filter the month:&lt;/P&gt;&lt;P&gt;Num((SUM({&amp;lt;[Year]={'$(vAnoActual)'}&lt;STRONG&gt;, Month={"&amp;lt;=$(vMesActual)"}&lt;/STRONG&gt;&amp;gt;}Qty)/ SUM({&amp;lt;[Year]={'$(vAnoAnterior)'}&lt;STRONG&gt;, Month={"&amp;lt;=$(vMesActual)"}&lt;/STRONG&gt;&amp;gt;} Qty))-1,'#.##0%')&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 09:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708094#M54326</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2020-06-04T09:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variation between currently years and month</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708296#M54341</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28676"&gt;@fosuzuki&lt;/a&gt;&amp;nbsp;!!&lt;/P&gt;&lt;P&gt;That is working! I thought about it but didn't know how to do it ...&lt;/P&gt;&lt;P&gt;Now in the KPI it is perfect, but how do you use this in the bar chart when my dimension&amp;nbsp; is&amp;nbsp; Years (2016, 2017, 2018, 2019, 2020) if used the same sentence only can see the currently year vs the last year&amp;nbsp; (imagen attached&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Before I used&amp;nbsp;=Num((SUM(Qty)/above(SUM(Qty)))-1,'#.##0%')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lucimar_0-1591289246706.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34965iF4AA501CDA6CDE74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lucimar_0-1591289246706.png" alt="Lucimar_0-1591289246706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanksss!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708296#M54341</guid>
      <dc:creator>Lucimar</dc:creator>
      <dc:date>2020-06-04T16:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variation between currently years and month</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708312#M54343</link>
      <description>&lt;P&gt;It is always good to create unique ids for period fields in script to perform point in time calculations.&lt;/P&gt;&lt;P&gt;This improves the performance, make code simple to understand and easy to maintain.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 18:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1708312#M54343</guid>
      <dc:creator>AbhijitBansode</dc:creator>
      <dc:date>2020-06-04T18:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Variation between currently years and month</title>
      <link>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1709068#M54422</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=Num((SUM(&lt;STRONG&gt;{&amp;lt;Month={"&amp;lt;=$(vMesActual)"}&amp;gt;}&lt;/STRONG&gt;Qty)/above(SUM(&lt;STRONG&gt;{&amp;lt;Month={"&amp;lt;=$(vMesActual)"}&amp;gt;}&lt;/STRONG&gt;Qty)))-1,'#.##0%')&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 14:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variation-between-currently-years-and-month/m-p/1709068#M54422</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2020-06-08T14:39:56Z</dc:date>
    </item>
  </channel>
</rss>

