<?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: Get Field Selections Syntax with IF statements in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138738#M92548</link>
    <description>&lt;P&gt;My Monlty variable is;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;=D&lt;/SPAN&gt;&lt;SPAN&gt;ate(MONTH-31, '&lt;/SPAN&gt;&lt;A class="jabberlink" tabindex="0" target="_blank"&gt;DD.MM.YYYY&lt;/A&gt;&lt;SPAN&gt;')&lt;BR /&gt;&lt;BR /&gt;I wrote above "sum({&amp;lt;MONTH= {'$(vMonthly)'}&amp;gt;} IPCOUNT) " works when I write 01.10.2023 instead of the variable in the formula. "sum({&amp;lt;MONTH= {'01.10.2023'}&amp;gt;} IPCOUNT) but it does not detect the variable value even though it is correct.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 09:58:57 GMT</pubDate>
    <dc:creator>Milaf</dc:creator>
    <dc:date>2023-11-17T09:58:57Z</dc:date>
    <item>
      <title>Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138566#M92533</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I could not run the calculated field below, this is the logic but I am making a mistake somewhere.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=if(GetFieldSelections([Period])='Daily', sum({&amp;lt;DATE= {'$(vYesterday)'}&amp;gt;} IPCOUNT),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(GetFieldSelections([Period]),'Weekly', sum({&amp;lt;DATE= {'$(vPreviousWeek)'}&amp;gt;}IPCOUNT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(GetFieldSelections([Period]),'Monthly',sum({&amp;lt;DATE= {'$(vPreviousMonth)'}&amp;gt;}IPCOUNT))))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 20:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138566#M92533</guid>
      <dc:creator>Milaf</dc:creator>
      <dc:date>2023-11-16T20:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138569#M92534</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/245060"&gt;@Milaf&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try correcting the syntax like this&lt;BR /&gt;&lt;BR /&gt;if(GetFieldSelections([Period])='Daily',sum({&amp;lt;DATE= {'$(vYesterday)'}&amp;gt;} IPCOUNT), &lt;BR /&gt;if(GetFieldSelections([Period])='Weekly', sum({&amp;lt;DATE= {'$(vPreviousWeek)'}&amp;gt;}IPCOUNT),&lt;BR /&gt;if(GetFieldSelections([Period])='Monthly',sum({&amp;lt;DATE= {'$(vPreviousMonth)'}&amp;gt;}IPCOUNT))))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 20:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138569#M92534</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2023-11-16T20:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138724#M92545</link>
      <description>&lt;P&gt;Thank you Matheus,&amp;nbsp;I didn't notice the syntax there but I&amp;nbsp;changed it when I saw it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Finally, I tried the one below, but the monthly one never works. I could not get the total of the previous month &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=if(GetFieldSelections([Period])='Daily',sum({&amp;lt;DATE= {'$(vYesterday)'}&amp;gt;} IPCOUNT),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(GetFieldSelections([Period])='Weekly',sum({&amp;lt;DATE= {'$(vPreviousWeek)'}&amp;gt;} IPCOUNT),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(GetFieldSelections([Period])='Monthly', sum({&amp;lt;MONTH= {'$(vMonthly)'}&amp;gt;} IPCOUNT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 09:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138724#M92545</guid>
      <dc:creator>Milaf</dc:creator>
      <dc:date>2023-11-17T09:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138738#M92548</link>
      <description>&lt;P&gt;My Monlty variable is;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;=D&lt;/SPAN&gt;&lt;SPAN&gt;ate(MONTH-31, '&lt;/SPAN&gt;&lt;A class="jabberlink" tabindex="0" target="_blank"&gt;DD.MM.YYYY&lt;/A&gt;&lt;SPAN&gt;')&lt;BR /&gt;&lt;BR /&gt;I wrote above "sum({&amp;lt;MONTH= {'$(vMonthly)'}&amp;gt;} IPCOUNT) " works when I write 01.10.2023 instead of the variable in the formula. "sum({&amp;lt;MONTH= {'01.10.2023'}&amp;gt;} IPCOUNT) but it does not detect the variable value even though it is correct.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 09:58:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138738#M92548</guid>
      <dc:creator>Milaf</dc:creator>
      <dc:date>2023-11-17T09:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138786#M92557</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/245060"&gt;@Milaf&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try this in your variable&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;vMonthly&lt;BR /&gt;$(=Date(MonthStart(AddMonths(today(1),-1)),'DD.MM.YYYY'))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 11:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2138786#M92557</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2023-11-17T11:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2139359#M92601</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/245060"&gt;@Milaf&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Close the topic and mark the solution as accepted &lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 11:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2139359#M92601</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2023-11-20T11:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get Field Selections Syntax with IF statements</title>
      <link>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2143623#M93057</link>
      <description>&lt;P&gt;This is the solution;&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections([Period]) ='Daily',&lt;BR /&gt;(sum({&amp;lt;Todayly= {'$(vYesterday)'}&amp;gt;} &lt;SPAN&gt;IPCOUNT1&lt;/SPAN&gt;) + sum({&amp;lt;Todayly= {'$(vYesterday)'}&amp;gt;} &lt;SPAN&gt;IPCOUNT2&lt;/SPAN&gt;) + sum({&amp;lt;Todayly= {'$(vYesterday)'}&amp;gt;} TotalCount)),&lt;BR /&gt;if(GetFieldSelections([Period])='Weekly',&lt;BR /&gt;(sum({&amp;lt;Todayly= {'$(vPreviousWeek)'}&amp;gt;} &lt;SPAN&gt;IPCOUNT1&lt;/SPAN&gt;) + sum({&amp;lt;DATE= {'$(vPreviousWeek)'}&amp;gt;} &lt;SPAN&gt;IPCOUNT2&lt;/SPAN&gt;) + sum({&amp;lt;Todayly= {'$(vPreviousWeek)'}&amp;gt;} TotalCount)),&lt;BR /&gt;if(GetFieldSelections([Period])='Monthly',&lt;BR /&gt;(sum({&amp;lt;Monthly= {'$(vAy)'}&amp;gt;} &lt;SPAN&gt;IPCOUNT1&lt;/SPAN&gt;) + sum({&amp;lt;Monthly= {'$(vAy)'}&amp;gt;} &lt;SPAN&gt;IPCOUNT2&lt;/SPAN&gt;) + sum({&amp;lt;Monthly= {'$(vAy)'}&amp;gt;} TotalCount))&lt;BR /&gt;)))&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 10:00:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-Field-Selections-Syntax-with-IF-statements/m-p/2143623#M93057</guid>
      <dc:creator>Milaf</dc:creator>
      <dc:date>2023-12-03T10:00:48Z</dc:date>
    </item>
  </channel>
</rss>

