<?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: AND/OR condition in set analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509569#M104727</link>
    <description>&lt;P&gt;Depending on your real dataset you may try:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;FailingYN={Y}&amp;gt;}&amp;nbsp;&lt;/STRONG&gt;count({&amp;lt;EnrolledYN={Y}&amp;gt;+&amp;lt;StonedYN={Y}&amp;gt;}Subject)&lt;/P&gt;&lt;P&gt;Beside this you may consider to make the appropriate checks already within the data-model because these flags might be not just Y/N else 1/0 or a dual() of it as well as something like pow(2, n) and the summed within another flag. By only 3 flag-fields this may too expensive but if there are a lot more and various kinds of queries it may save a lot of efforts.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2025 16:02:32 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2025-03-12T16:02:32Z</dc:date>
    <item>
      <title>AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509558#M104726</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Given the following data...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stascher_0-1741793186567.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178467i78BA7FD7C738A5FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stascher_0-1741793186567.png" alt="stascher_0-1741793186567.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What would the set analysis be to count all of the Subjects who are: (Enrolled &lt;EM&gt;or&lt;/EM&gt; Stoned) &lt;EM&gt;and&lt;/EM&gt; Failing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the following works:&amp;nbsp;&lt;STRONG&gt;count({&amp;lt;EnrolledYN={Y},FailingYN={Y}&amp;gt;+&amp;lt;StonedYN={Y},FailingYN={Y}&amp;gt;}Subject)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;but is there a more efficient way to write it without having to specify FailingYN multiple times?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;BR /&gt;Steve&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 15:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509558#M104726</guid>
      <dc:creator>stascher</dc:creator>
      <dc:date>2025-03-12T15:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509569#M104727</link>
      <description>&lt;P&gt;Depending on your real dataset you may try:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;FailingYN={Y}&amp;gt;}&amp;nbsp;&lt;/STRONG&gt;count({&amp;lt;EnrolledYN={Y}&amp;gt;+&amp;lt;StonedYN={Y}&amp;gt;}Subject)&lt;/P&gt;&lt;P&gt;Beside this you may consider to make the appropriate checks already within the data-model because these flags might be not just Y/N else 1/0 or a dual() of it as well as something like pow(2, n) and the summed within another flag. By only 3 flag-fields this may too expensive but if there are a lot more and various kinds of queries it may save a lot of efforts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 16:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509569#M104727</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-03-12T16:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509582#M104730</link>
      <description>&lt;P&gt;Check this&amp;nbsp;&lt;/P&gt;&lt;P&gt;COUNT({&amp;lt;FailingYN={'Y'}, EnrolledYN={'Y'}+StonedYN={'Y'}&amp;gt;} Subject)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 17:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509582#M104730</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-03-12T17:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509604#M104732</link>
      <description>&lt;P&gt;Thanks Marcus.&lt;BR /&gt;&lt;BR /&gt;I've never seen set analysis used outside of a function, but it works. Is this use case documented in Qlik Sense help anywhere? Can I ask what makes this approach "expensive" vs putting set analysis inside a function?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 20:22:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509604#M104732</guid>
      <dc:creator>stascher</dc:creator>
      <dc:date>2025-03-12T20:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509606#M104734</link>
      <description>&lt;P&gt;Unfortunately this approach caused an expression error. Thanks for trying though.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 20:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509606#M104734</guid>
      <dc:creator>stascher</dc:creator>
      <dc:date>2025-03-12T20:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509652#M104739</link>
      <description>&lt;P&gt;It's documented here:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-analysis-expressions.htm" target="_blank"&gt;Set analysis | Qlik Cloud Help&lt;/A&gt;&amp;nbsp;and more background (see also the various comments) is here:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/New-Set-Analysis-syntax/bc-p/2509556" target="_blank"&gt;New Set Analysis syntax - Page 8 - Qlik Community - 1983110&lt;/A&gt;. Be aware that this powerful extending of the set analysis is increasing the complexity and not the opposite - and inner and outer statements aren't blindly replaceable or mixable.&lt;/P&gt;&lt;P&gt;The hint in regard to the expensive efforts of a possible flag-handling means that flags could be also categorized and grouped especially if they have a numerical value because then the sum/max/min/avg of them could summarize the meaning and/or with flags which follow an exponential logic it's possible to combine n flags within a single one. For only 3 flags it's too complex but if there are several dozen of flags in scoring-scenarios or similar stuff you won't be happy to address and query them all within nested logic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 07:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2509652#M104739</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-03-13T07:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: AND/OR condition in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2511509#M105068</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 14:56:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AND-OR-condition-in-set-analysis/m-p/2511509#M105068</guid>
      <dc:creator>stascher</dc:creator>
      <dc:date>2025-03-25T14:56:16Z</dc:date>
    </item>
  </channel>
</rss>

