<?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: Set Analysis with Or condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534082#M108325</link>
    <description>&lt;P&gt;Try this for any 1&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {&amp;lt;ID = {"=Sum(test1+test2+test3+test4) &amp;gt; 0"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;Try this for any 0&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {&amp;lt;ID = {"=Sum(test1+test2+test3+test4) = 0"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can try this way&lt;/P&gt;&lt;P&gt;=Count(DISTINCT If(test1 = 1 or test2 = 1 or test3 = 1 or test4 = 1, ID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all 0&lt;/P&gt;&lt;P&gt;=Count(DISTINCT If(test1 = 0 and test2 = 0 and test3 = 0 and test4 = 0, ID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Oct 2025 12:56:21 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2025-10-22T12:56:21Z</dc:date>
    <item>
      <title>Set Analysis with Or condition</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534072#M108320</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a data set like below and i need create a textbox to count distinct ID where any of values from test1 to test4 is 1 and other textbox showing count with any&amp;nbsp;of values from test1 to test4 is 0, without counting them twice.&lt;/P&gt;
&lt;P&gt;For example - Count(any of values from test1 to test4 is 1) = 5&lt;/P&gt;
&lt;P&gt;Count(any of values from test1 to test4 is 0) = 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="5" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD width="64" height="18" style="height: 13.2pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;test1&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;test2&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;test2&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;test4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;AAA&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;BBB&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;CCC&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;DDD&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;EEE&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;FFF&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;GGG&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone pls help me understand how to achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 11:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534072#M108320</guid>
      <dc:creator>Shivam22</dc:creator>
      <dc:date>2025-10-22T11:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Or condition</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534078#M108323</link>
      <description>&lt;P&gt;This would be a union, seemingly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&amp;lt; test1 = {1} + test2 = {1} + test3 = {1} + test4 = {1} &amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-operators.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-operators.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 12:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534078#M108323</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2025-10-22T12:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Or condition</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534081#M108324</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/351984"&gt;@Shivam22&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can also change your Load Script to facilitate the chart measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TestData:
Load 
    ID,
    test1,
    test2,
    test3,
    test4,
    If(RangeSum(test1,test2,test3,test4) = 0,0,1) AS CountFlag
Inline [
ID, test1, test2, test3, test4
AAA, 1, 0, 1, 0
BBB, 1, 1, 1, 1
CCC, 1, 0, 1, 0
DDD, 0, 1, 0, 1
EEE, 1, 1, 1, 1
FFF, 0, 0, 0, 0
GGG, 0, 0, 0, 0
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Measures will be like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marksouzacosta_0-1761137652803.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184381i9A99A1BF01ED4839/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marksouzacosta_0-1761137652803.png" alt="marksouzacosta_0-1761137652803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mark Costa&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 12:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534081#M108324</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2025-10-22T12:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Or condition</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534082#M108325</link>
      <description>&lt;P&gt;Try this for any 1&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {&amp;lt;ID = {"=Sum(test1+test2+test3+test4) &amp;gt; 0"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;Try this for any 0&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {&amp;lt;ID = {"=Sum(test1+test2+test3+test4) = 0"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can try this way&lt;/P&gt;&lt;P&gt;=Count(DISTINCT If(test1 = 1 or test2 = 1 or test3 = 1 or test4 = 1, ID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all 0&lt;/P&gt;&lt;P&gt;=Count(DISTINCT If(test1 = 0 and test2 = 0 and test3 = 0 and test4 = 0, ID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 12:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-with-Or-condition/m-p/2534082#M108325</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-10-22T12:56:21Z</dc:date>
    </item>
  </channel>
</rss>

