<?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 Unable to write Set Analysis Expression for if condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Unable-to-write-Set-Analysis-Expression-for-if-condition/m-p/1857979#M70825</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Requirement:&lt;/P&gt;
&lt;P&gt;Need to Create a table to count the IDs where the difference between Rolling date and Last updated date is between 0 to 6.&lt;/P&gt;
&lt;P&gt;I have created a Table object with Dimension as RollingDate and measure as below and it works perfectly&lt;/P&gt;
&lt;P&gt;count(distinct if((RollingDate-LAST_UPDATED_DATE&amp;lt;=6 and RollingDate-LAST_UPDATED_DATE&amp;gt;=0 ), ID))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I try to write with Set analysis, it shows 0 as measure with dimension RollingDate&lt;/P&gt;
&lt;P&gt;Count({&amp;lt;RollingDate={"=RollingDate &amp;lt;= (LAST_UPDATED_DATE + 6)"}&amp;gt;}ID).&lt;/P&gt;
&lt;P&gt;Kindly help me to create a table with dimension RollingDate and measure with Set analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;DIV id="tinyMceEditorpradeep92_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 06:09:18 GMT</pubDate>
    <dc:creator>pradeep92</dc:creator>
    <dc:date>2021-11-11T06:09:18Z</dc:date>
    <item>
      <title>Unable to write Set Analysis Expression for if condition</title>
      <link>https://community.qlik.com/t5/App-Development/Unable-to-write-Set-Analysis-Expression-for-if-condition/m-p/1857979#M70825</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Requirement:&lt;/P&gt;
&lt;P&gt;Need to Create a table to count the IDs where the difference between Rolling date and Last updated date is between 0 to 6.&lt;/P&gt;
&lt;P&gt;I have created a Table object with Dimension as RollingDate and measure as below and it works perfectly&lt;/P&gt;
&lt;P&gt;count(distinct if((RollingDate-LAST_UPDATED_DATE&amp;lt;=6 and RollingDate-LAST_UPDATED_DATE&amp;gt;=0 ), ID))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I try to write with Set analysis, it shows 0 as measure with dimension RollingDate&lt;/P&gt;
&lt;P&gt;Count({&amp;lt;RollingDate={"=RollingDate &amp;lt;= (LAST_UPDATED_DATE + 6)"}&amp;gt;}ID).&lt;/P&gt;
&lt;P&gt;Kindly help me to create a table with dimension RollingDate and measure with Set analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;DIV id="tinyMceEditorpradeep92_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 06:09:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Unable-to-write-Set-Analysis-Expression-for-if-condition/m-p/1857979#M70825</guid>
      <dc:creator>pradeep92</dc:creator>
      <dc:date>2021-11-11T06:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to write Set Analysis Expression for if condition</title>
      <link>https://community.qlik.com/t5/App-Development/Unable-to-write-Set-Analysis-Expression-for-if-condition/m-p/1857981#M70826</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would suggest you to create a flag in the script like below.&lt;/P&gt;
&lt;P&gt;E.g&amp;nbsp;&lt;SPAN&gt;if(RollingDate-LAST_UPDATED_DATE&amp;lt;=6 and RollingDate-LAST_UPDATED_DATE&amp;gt;=0,1,0 ) as Flag&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And use that flag in Set Analysis.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count(Distinct {&amp;lt;Flag = {'1'}&amp;gt;}ID)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ashutosh&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 06:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Unable-to-write-Set-Analysis-Expression-for-if-condition/m-p/1857981#M70826</guid>
      <dc:creator>AshutoshBhumkar</dc:creator>
      <dc:date>2021-11-11T06:21:10Z</dc:date>
    </item>
  </channel>
</rss>

