<?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 Set Analysis with multiple conditions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721563#M54889</link>
    <description>&lt;P&gt;My old set analysis skills are lost.&lt;/P&gt;&lt;P&gt;I have tried so many versions of below code without success.&lt;/P&gt;&lt;P&gt;Below version gives me the correct count for the date but does not apply the other modifiers.&lt;/P&gt;&lt;P&gt;Count(Distinct ${&amp;lt;import_date={"=(vMax_import_date)"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/P&gt;&lt;P&gt;The variable vMax_import_date is max(import_date)&lt;/P&gt;&lt;P&gt;And below version gives me the correct count but the date is hard coded which it cannot be in the app.&lt;/P&gt;&lt;P&gt;Count(Distinct{&amp;lt;import_date={"2020-06-21"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 21:08:46 GMT</pubDate>
    <dc:creator>Xerxes</dc:creator>
    <dc:date>2021-12-20T21:08:46Z</dc:date>
    <item>
      <title>Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721563#M54889</link>
      <description>&lt;P&gt;My old set analysis skills are lost.&lt;/P&gt;&lt;P&gt;I have tried so many versions of below code without success.&lt;/P&gt;&lt;P&gt;Below version gives me the correct count for the date but does not apply the other modifiers.&lt;/P&gt;&lt;P&gt;Count(Distinct ${&amp;lt;import_date={"=(vMax_import_date)"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/P&gt;&lt;P&gt;The variable vMax_import_date is max(import_date)&lt;/P&gt;&lt;P&gt;And below version gives me the correct count but the date is hard coded which it cannot be in the app.&lt;/P&gt;&lt;P&gt;Count(Distinct{&amp;lt;import_date={"2020-06-21"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721563#M54889</guid>
      <dc:creator>Xerxes</dc:creator>
      <dc:date>2021-12-20T21:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721564#M54890</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Try This:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count(Distinct {$ &amp;lt;import_date={"=$(vMax_import_date)"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Set analysis needs to be enclosed in curly brackets.&amp;nbsp; Then the $ symbol is for the current selections, the angled brackets are the modifiers. To get variable values, enclose in dollar sign expansion.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721564#M54890</guid>
      <dc:creator>shanemichelon</dc:creator>
      <dc:date>2020-06-24T06:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721571#M54893</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;With the suggested solution the date filter is not applied, the days_late and brand are applied so the result is the same as if I remove the date.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721571#M54893</guid>
      <dc:creator>Xerxes</dc:creator>
      <dc:date>2020-06-24T06:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721574#M54895</link>
      <description>&lt;P&gt;Sorry, I just noticed your date variable is Max(import_date).&amp;nbsp; This give a numeric result.&amp;nbsp; You need to turn that back into a date with the Date function.&amp;nbsp; You can do it in the variable or in the set analysis:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count(Distinct {$ &amp;lt;import_date={"=$(=Date(vMax_import_date))"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In QS expression editor you should be able to see the result of the set analysis at the bottom.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:56:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721574#M54895</guid>
      <dc:creator>shanemichelon</dc:creator>
      <dc:date>2020-06-24T06:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721615#M54898</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try below expression&lt;/P&gt;&lt;P&gt;Count(Distinct ${&amp;lt;import_date={"$(=Date(Max(import_date),'YYYY-MM-DD'))"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 08:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721615#M54898</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-06-24T08:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721660#M54904</link>
      <description>&lt;P&gt;This string gives 0 as result -&amp;gt;&lt;/P&gt;&lt;P&gt;Count(Distinct {$ &amp;lt;import_date={"=$(=Date(vMax_import_date))"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 10:54:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721660#M54904</guid>
      <dc:creator>Xerxes</dc:creator>
      <dc:date>2020-06-24T10:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721664#M54905</link>
      <description>&lt;P&gt;Yes, close enough!&lt;/P&gt;&lt;P&gt;Moving the $ into the bracket worked.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count(Distinct {$&amp;lt;import_date={"$(=Date(Max(import_date),'YYYY-MM-DD'))"}, days_late={"&amp;gt;0 &amp;lt;31"}, brand={"Nike", "Puma"}&amp;gt;} account_id)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Jun 2020 10:57:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-multiple-conditions/m-p/1721664#M54905</guid>
      <dc:creator>Xerxes</dc:creator>
      <dc:date>2020-06-24T10:57:35Z</dc:date>
    </item>
  </channel>
</rss>

