<?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: Using variable with set analysis (YTD) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651667#M48598</link>
    <description>&lt;P&gt;Hi Hermilogayosso,&lt;/P&gt;&lt;P&gt;can you try this hope so it will help you,&lt;/P&gt;&lt;P&gt;vMontoVenta1:&lt;BR /&gt;IF (SalesNum = 1, SUM ({&amp;lt;[Año]={"$(=max([Año]))"} &amp;gt;}Amount_Sale_20), SUM ({&amp;lt;[Año]={"$(=max([Año]))"} &amp;gt;}Amount_Sale))&lt;/P&gt;&lt;P&gt;vMontoVenta2:&lt;BR /&gt;IF (SalesNum = 1, SUM (Amount_Sale_20), SUM (Amount_Sale))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Final Expression:&lt;/P&gt;&lt;P&gt;if(GetSelectedCount([Año])&amp;lt;&amp;gt;1,&lt;BR /&gt;$(vMontoVenta1)/1000,&lt;BR /&gt;$(vMontoVenta2)/1000&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 05:36:31 GMT</pubDate>
    <dc:creator>vishalarote</dc:creator>
    <dc:date>2019-11-27T05:36:31Z</dc:date>
    <item>
      <title>Using variable with set analysis (YTD)</title>
      <link>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651191#M48577</link>
      <description>&lt;P&gt;Hello community, good day.&lt;/P&gt;&lt;P&gt;I am working on the following challenge:&lt;/P&gt;&lt;P&gt;The idea is to generate a bar graph in which the sales per month of the current year are shown vs the sales per month of the previous year: to this point there is no big problem,&amp;nbsp;In the example I am comparing 2016 (pink) vs 2017 (blue):&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;my problem starts when I want to use a variable within the graph, it shows "Venta" or "Venta20%" (sales * 0.2) according to the selection (dimension)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;vMontoVenta&lt;/STRONG&gt; &lt;/EM&gt;=&amp;nbsp;&lt;EM&gt;IF(SalesNum=1,SUM(Monto_Venta_20),SUM(Monto_Venta))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2_ytd_variable.png" style="width: 695px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24403i660047A4EBB34823/image-size/large?v=v2&amp;amp;px=999" role="button" title="2_ytd_variable.png" alt="2_ytd_variable.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I need is to add that variable to the graph, so that it responds to the filter called "KPI". I have tried it as follows but without any result:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if(GetSelectedCount([Año])&amp;lt;&amp;gt;1, &lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Sum({&amp;lt;[Año]={$(=max([Año]))} &amp;gt;} '$ (vMontoVenta)')/1000, &lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Sum({&amp;lt;[Año]={$(vAño)}&amp;gt;} '$ (vMontoVenta)')/1000&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;when using that set analysis the graph shows like this&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3_ytd_variable.png" style="width: 683px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24404i9A4D321F1F8EB21E/image-size/large?v=v2&amp;amp;px=999" role="button" title="3_ytd_variable.png" alt="3_ytd_variable.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea what I am doing wrong ?, I appreciate your help&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:01:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651191#M48577</guid>
      <dc:creator>hermilogayosso</dc:creator>
      <dc:date>2024-11-16T04:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable with set analysis (YTD)</title>
      <link>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651229#M48578</link>
      <description>&lt;P&gt;Hi Hermilogayosso,&lt;/P&gt;&lt;P&gt;If you passed '=' sign while creating variable the use variable name as it is without any '$(variable)'&lt;/P&gt;&lt;P&gt;Or else&amp;nbsp;&lt;/P&gt;&lt;P&gt;Remove '=' sign from variable expression and used your final expression '$(variable)'&lt;/P&gt;&lt;P&gt;Or else&amp;nbsp;&lt;/P&gt;&lt;P&gt;='$(=IF(SalesNum=1,SUM(Monto_Venta_20),SUM(Monto_Venta)))' into variable&amp;nbsp;vMontoVenta and pass into final expression&amp;nbsp;vMontoVenta&lt;/P&gt;&lt;P&gt;as like&amp;nbsp;&lt;STRONG&gt;if(GetSelectedCount([Año])&amp;lt;&amp;gt;1,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Sum({&amp;lt;[Año]={$(=max([Año]))} &amp;gt;} vMontoVenta)/1000,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Sum({&amp;lt;[Año]={$(vAño)}&amp;gt;} vMontoVenta)/1000&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 07:08:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651229#M48578</guid>
      <dc:creator>vishalarote</dc:creator>
      <dc:date>2019-11-26T07:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable with set analysis (YTD)</title>
      <link>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651630#M48594</link>
      <description>&lt;P&gt;Hi Vishalarote, thanks for the help&lt;BR /&gt;I have this variable called &lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;vMontoVenta&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;= IF (SalesNum = 1, SUM (Amount_Sale_20), SUM (Amount_Sale)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and this measure:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(GetSelectedCount([Año])&amp;lt;&amp;gt;1, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Sum({&amp;lt;[Año]={$(=max([Año]))} &amp;gt;} &lt;FONT color="#FF0000"&gt;vMontoVenta&lt;/FONT&gt;)/1000, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Sum({&amp;lt;[Año]={$(vAño)}&amp;gt;} &lt;FONT color="#FF0000"&gt;vMontoVenta&lt;/FONT&gt;)/1000&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but when using them in a graph it doesn't show data&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4_ytd_variable.png" style="width: 618px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24491iD4B96DB556759299/image-size/large?v=v2&amp;amp;px=999" role="button" title="4_ytd_variable.png" alt="4_ytd_variable.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any other idea why it doesn't work?&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 22:11:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651630#M48594</guid>
      <dc:creator>hermilogayosso</dc:creator>
      <dc:date>2019-11-26T22:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable with set analysis (YTD)</title>
      <link>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651667#M48598</link>
      <description>&lt;P&gt;Hi Hermilogayosso,&lt;/P&gt;&lt;P&gt;can you try this hope so it will help you,&lt;/P&gt;&lt;P&gt;vMontoVenta1:&lt;BR /&gt;IF (SalesNum = 1, SUM ({&amp;lt;[Año]={"$(=max([Año]))"} &amp;gt;}Amount_Sale_20), SUM ({&amp;lt;[Año]={"$(=max([Año]))"} &amp;gt;}Amount_Sale))&lt;/P&gt;&lt;P&gt;vMontoVenta2:&lt;BR /&gt;IF (SalesNum = 1, SUM (Amount_Sale_20), SUM (Amount_Sale))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Final Expression:&lt;/P&gt;&lt;P&gt;if(GetSelectedCount([Año])&amp;lt;&amp;gt;1,&lt;BR /&gt;$(vMontoVenta1)/1000,&lt;BR /&gt;$(vMontoVenta2)/1000&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 05:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-variable-with-set-analysis-YTD/m-p/1651667#M48598</guid>
      <dc:creator>vishalarote</dc:creator>
      <dc:date>2019-11-27T05:36:31Z</dc:date>
    </item>
  </channel>
</rss>

