<?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: Ventas mes anterior por productos in Español</title>
    <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102143#M1155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Walter, parece que al filtrar por año se pierdo el acceso a alguno de los datos necesarios, seguramente a peso_promedio y/o unidades_por_caja. Puede que haya que aplicarlo a pesable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;La función Only() sirve para devolver un valor sin función de agregación (Sum, Avg...) y permite aplicar un set analysis:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{$&amp;lt;año={$(=Max(año)-1)}&amp;gt;} &lt;/SPAN&gt;peso_promedio*unidades_por_caja)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2018 15:49:27 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2018-09-06T15:49:27Z</dc:date>
    <item>
      <title>Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102141#M1153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola a todos. Estoy haciendo un informe en Qlik Sense que pensé que iba a resultar más fácil pero me está costando horrores.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Se trata de comparar las unidades vendidas entre un año y el anterior, viéndolo por productos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Las unidades se calculan dependiendo de si el producto es pesable (kgs) o NO:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Producto pesable&lt;/STRONG&gt; = Kilogramos / (peso_promedio*unidades_por_caja)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Producto NO pesable&lt;/STRONG&gt; = cantidad* unidades_por_caja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;entonces:&lt;/P&gt;&lt;P&gt;unidades = if(pesable=1, Sum(Kilogramos) / (peso_promedio*unidades_por_caja), Sum(cantidad* unidades_por_caja)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;para el año anterior hago &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unidades = if(pesable=1, Sum({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;}Kilogramos) / (peso_promedio*unidades_por_caja), Sum({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;}cantidad* unidades_por_caja)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;El cálculo parece hacerlo bien, pero el problema es que cuando hay productos que no se vendieron en 2018, pero si en 2017, entonces devuelve 0 (cero) o null.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;IMG alt="Captura.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212855_Captura.PNG" style="height: 207px; width: 620px;" /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alguien me puede ayudar?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102141#M1153</guid>
      <dc:creator>walter_hardy</dc:creator>
      <dc:date>2018-09-06T13:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102142#M1154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;La formula la evalúa en la dimensión (ID_producto), Max(año) en los productos donde no se compró tiene valor nulo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Si tienes campos derivados de autocalendario sería más práctico algo del tipo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;if(pesable=1, Sum(Kilogramos) / (peso_promedio*unidades_por_caja), Sum(cantidad* unidades_por_caja)*CYTD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;if(pesable=1, Sum(Kilogramos) / (peso_promedio*unidades_por_caja), Sum(cantidad* unidades_por_caja)*LYTD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Donde CYTD y LYTD son flags creadas en la carga de datos.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Mira esto:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/es-ES/sense/September2017/Subsystems/Hub/Content/Measures/create-calendar-measure.htm" title="https://help.qlik.com/es-ES/sense/September2017/Subsystems/Hub/Content/Measures/create-calendar-measure.htm"&gt;https://help.qlik.com/es-ES/sense/September2017/Subsystems/Hub/Content/Measures/create-calendar-measure.htm&lt;/A&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 14:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102142#M1154</guid>
      <dc:creator>juliocodesal</dc:creator>
      <dc:date>2018-09-06T14:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102143#M1155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Walter, parece que al filtrar por año se pierdo el acceso a alguno de los datos necesarios, seguramente a peso_promedio y/o unidades_por_caja. Puede que haya que aplicarlo a pesable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;La función Only() sirve para devolver un valor sin función de agregación (Sum, Avg...) y permite aplicar un set analysis:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{$&amp;lt;año={$(=Max(año)-1)}&amp;gt;} &lt;/SPAN&gt;peso_promedio*unidades_por_caja)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 15:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102143#M1155</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-09-06T15:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102144#M1156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Intenté SIN éxito:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(pesable=1, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;} Kilogramos) / Only({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;} peso_promedio * unidades_por_caja), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;}cantidad * Only({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;} unidades_por_caja))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 16:15:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102144#M1156</guid>
      <dc:creator>walter_hardy</dc:creator>
      <dc:date>2018-09-06T16:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102145#M1157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Por lo que puedo observar en el detalle de una tabla simple, veo que el IF de la fórmula evalúa algunos productos que son pesables como NO pesables porque no tienen ventas en el año 2018. Cómo puedo evitar eso?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 17:02:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102145#M1157</guid>
      <dc:creator>walter_hardy</dc:creator>
      <dc:date>2018-09-06T17:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102146#M1158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Puedes probar con:&lt;/P&gt;&lt;P&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Only({$&amp;lt;año={$(=Max(año)-1)}&amp;gt;} pesable)=1,...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 05:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102146#M1158</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-09-07T05:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ventas mes anterior por productos</title>
      <link>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102147#M1159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Con esa expresión sí funciona! Muchas gracias Ruben Marin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 11:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Espa%C3%B1ol/Ventas-mes-anterior-por-productos/m-p/102147#M1159</guid>
      <dc:creator>walter_hardy</dc:creator>
      <dc:date>2018-09-11T11:11:51Z</dc:date>
    </item>
  </channel>
</rss>

