<?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: User defined date variable not working in sum expression year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000258#M82842</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year={$(=Year($(vSelectionDateStart)))}&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2022 15:55:34 GMT</pubDate>
    <dc:creator>Aurelien_Martinez</dc:creator>
    <dc:date>2022-11-03T15:55:34Z</dc:date>
    <item>
      <title>User defined date variable not working in sum expression year</title>
      <link>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000249#M82841</link>
      <description>&lt;P&gt;I know this is just a syntax issue but I can't seem to find a clear explanation of how to do this. I just want to use the year expression to refine my sum value. I can put a hardcoded value like 2022 in and it works fine, like this:&lt;/P&gt;
&lt;P&gt;Year = {2022},&lt;/P&gt;
&lt;P&gt;But this doesn't work&lt;BR /&gt;Year = Year(vSelectionDateStart),&lt;/P&gt;
&lt;P&gt;However if I display just this:&lt;/P&gt;
&lt;P&gt;Year(vSelectionDateStart)&lt;/P&gt;
&lt;P&gt;it gives me the year like I would expect.&lt;/P&gt;
&lt;P&gt;Can someone please explain what I'm doing wrong and if you'd be so kind why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the complete block for reference:&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;&lt;BR /&gt;Year = {2022},&lt;/P&gt;
&lt;P&gt;//&amp;nbsp;Year = Year(vSelectionDateStart),&lt;/P&gt;
&lt;P&gt;[Account.Account Number]={660}&lt;BR /&gt;&amp;gt;}&lt;/P&gt;
&lt;P&gt;[Transactions.Amount With Sign]&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 15:44:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000249#M82841</guid>
      <dc:creator>WriteCodeEveryDay</dc:creator>
      <dc:date>2022-11-03T15:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: User defined date variable not working in sum expression year</title>
      <link>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000258#M82842</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year={$(=Year($(vSelectionDateStart)))}&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 15:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000258#M82842</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2022-11-03T15:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: User defined date variable not working in sum expression year</title>
      <link>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000279#M82845</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;&lt;BR /&gt;Year = {'$(&lt;SPAN&gt;vSelectionDateStart&lt;/SPAN&gt;)'},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Account.Account Number]={660}&lt;BR /&gt;&amp;gt;}&lt;/P&gt;
&lt;P&gt;[Transactions.Amount With Sign]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 16:17:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000279#M82845</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2022-11-03T16:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: User defined date variable not working in sum expression year</title>
      <link>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000309#M82852</link>
      <description>&lt;P&gt;Unfortunately neither of these seem to work. I failed to explain the date format in the variable. It's 03/01/2022 to clarify.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Year = {'$(&lt;/SPAN&gt;&lt;SPAN&gt;vSelectionDateStart&lt;/SPAN&gt;&lt;SPAN&gt;)'},&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The above doesn't seem to have the year function to strip that value out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Year={$(=Year($(vSelectionDateStart)))},&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this everything in the braces goes gray like it's all being interpreted as a literal (I think, new to qlik).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Any other suggestions?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 17:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000309#M82852</guid>
      <dc:creator>WriteCodeEveryDay</dc:creator>
      <dc:date>2022-11-03T17:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: User defined date variable not working in sum expression year</title>
      <link>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000328#M82854</link>
      <description>&lt;P&gt;This was on the right track, I had to drop the second $ and parenthesis.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked:&lt;/P&gt;
&lt;P&gt;Year={$(=Year(vSelectionDateStart))},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for getting me headed in the right direction!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 18:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/User-defined-date-variable-not-working-in-sum-expression-year/m-p/2000328#M82854</guid>
      <dc:creator>WriteCodeEveryDay</dc:creator>
      <dc:date>2022-11-03T18:05:59Z</dc:date>
    </item>
  </channel>
</rss>

