<?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: Problem with variable in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1872081#M1216560</link>
    <description>&lt;P&gt;you can try with this?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Year={$(=MAX(Year))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Year={$(=Year(Today()))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Dec 2021 14:24:33 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2021-12-16T14:24:33Z</dc:date>
    <item>
      <title>Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871370#M1216540</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to have the current year which is inside a variable defined in Qlikview ( not in script ).&lt;/P&gt;
&lt;P&gt;So i have a variable currentYear - Year(Date(Today(), 'MM/DD/YYYY'))&amp;nbsp; - Which so now returns me 2021.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And i would like to use it in my set analysis which is &lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;num( (sum({&amp;lt;Mois={'déc.'}&amp;gt;*&amp;lt;Année={'=$(LastYear)'}&amp;gt;} FinMois*POLO*alt([INTER],0)/100)) ,'# ##0,00',',',' ')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I tried before not to put in a variable but the solution there &lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Include-the-current-year-in-Expression/td-p/1366252" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Include-the-current-year-in-Expression/td-p/1366252&lt;/A&gt; didn't work i don't understand why...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I tried also this solution for variable but same : &lt;A href="https://community.qlik.com/t5/New-to-Qlik-Sense/Using-variable-in-Set-Analysis/td-p/1059541" target="_blank"&gt;https://community.qlik.com/t5/New-to-Qlik-Sense/Using-variable-in-Set-Analysis/td-p/1059541&lt;/A&gt; ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for reading&lt;/P&gt;
&lt;P&gt;if someone knows why in case&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks a lot !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 11:09:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871370#M1216540</guid>
      <dc:creator>flo2</dc:creator>
      <dc:date>2021-12-15T11:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871422#M1216541</link>
      <description>&lt;P&gt;Your variable is currentYear, but in your set analysis you're trying to use LastYear?&lt;/P&gt;
&lt;P&gt;You also shouldn't need the equal sign in this case, I think - just {'$(currentYear)'}&lt;/P&gt;
&lt;P&gt;And this isn't actually important, but Year(Today()) is enough to get today's year, you don't need the extra date() layer with formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 12:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871422#M1216541</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-12-15T12:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871432#M1216543</link>
      <description>&lt;P&gt;Thanks for response and informations &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; But it still doesn't work i don't understand why, i have this, the expression is shown as " OK" but the graph is empty. &lt;/P&gt;
&lt;P&gt;num( (sum({&amp;lt;Mois={'déc.'}&amp;gt;*&amp;lt;Année={'$(currentYear)'}&amp;gt;} FinMois*&lt;EM&gt;POLO&lt;/EM&gt;*alt([&lt;EM&gt;INTER&lt;/EM&gt;],0)/100)) ,'# ##0,00',',',' ')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i replace the variable by 2021 it works, the graph is shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the variable is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 13:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871432#M1216543</guid>
      <dc:creator>flo2</dc:creator>
      <dc:date>2021-12-15T13:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871441#M1216544</link>
      <description>&lt;P&gt;Try it with ...&amp;nbsp;&lt;SPAN&gt;Année={$(&lt;STRONG&gt;=&lt;/STRONG&gt;currentYear)} ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 13:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871441#M1216544</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-12-15T13:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871442#M1216545</link>
      <description>&lt;P&gt;Try changing your variable to&lt;/P&gt;
&lt;P&gt;=Year(Date(Today())&lt;/P&gt;
&lt;P&gt;With the equal sign at the start of it.&lt;/P&gt;
&lt;P&gt;Or just use &lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate"&gt;$(=Year(Today()))&lt;/SPAN&gt; without a variable.&lt;/P&gt;
&lt;P&gt;For a better understanding of how variables work when expanded, have a look at henric's post here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Variables/ba-p/1465499" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Variables/ba-p/1465499&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 13:37:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1871442#M1216545</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-12-15T13:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1872081#M1216560</link>
      <description>&lt;P&gt;you can try with this?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Year={$(=MAX(Year))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Year={$(=Year(Today()))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 14:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1872081#M1216560</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2021-12-16T14:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1872101#M1216561</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/135958"&gt;@flo2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Can you provide some more information like what is variable Name, and why you use intersection * symbol?&lt;/P&gt;
&lt;P&gt;Try below&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in your variable definition, use "=" symbol, so&amp;nbsp; that it evaluate at variable definition only&lt;/P&gt;
&lt;P&gt;like&lt;/P&gt;
&lt;P&gt;Variable Name is &lt;STRONG&gt;CurrentYear&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Definition &lt;STRONG&gt;=Year(Today())&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set Analysis&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Mois={'d&lt;SPAN&gt;é&lt;/SPAN&gt;c.'},Ann&lt;SPAN&gt;é&lt;/SPAN&gt;e={"$(=CurrentYear)"}&amp;gt;}(FinMois*POLO*alt([INTER],0))/100)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if above not work then Please post screen shot it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 14:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-variable-in-set-analysis/m-p/1872101#M1216561</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2021-12-16T14:46:30Z</dc:date>
    </item>
  </channel>
</rss>

