<?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 And Condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765878#M591009</link>
    <description>&lt;P&gt;it is possible to use set analysis only using the expression i posted&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 00:02:02 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2020-12-03T00:02:02Z</dc:date>
    <item>
      <title>Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765744#M591003</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17935"&gt;@MayilVahanan&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm learning Set Analysis and facing one issue in it.&lt;/P&gt;&lt;P&gt;This is the sample Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;Product, Flag, Value, Units&lt;BR /&gt;Eggs, Daily, 100, 40&lt;BR /&gt;Eggs, Weekly, 1000, 400&lt;BR /&gt;Soap, Daily, 250, 10&lt;BR /&gt;Soap, Weekly, 2500, 100&lt;BR /&gt;Milk, Daily, 250, 8&lt;BR /&gt;Milk, Weekly, 2500, 80&lt;BR /&gt;Curd, Daily, 140, 20&lt;BR /&gt;Curd, Weekly, 1400, 200&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I need all those products which have Flag='Daily' and Maximim Value. The Maximum value for Flag Daily is '250' and if there are 2 same values&lt;BR /&gt;like I've in my Data Set '250' so for such cases I need to show the Product which has Max units.&lt;/P&gt;&lt;P&gt;2 conditions need to be fulfilled.&lt;BR /&gt;So, from the above table, the result should be:&lt;/P&gt;&lt;P&gt;Product, Flag, Value, Units&lt;BR /&gt;Soap, Daily, 250, 10&lt;/P&gt;&lt;P&gt;because it have max units '10'&lt;/P&gt;&lt;P&gt;I'm trying to achieve the result through Set Intersection.&lt;/P&gt;&lt;P&gt;See this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Set Analysis And condition Issue.png" style="width: 636px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45115i99B4D2C6577A8145/image-size/large?v=v2&amp;amp;px=999" role="button" title="Set Analysis And condition Issue.png" alt="Set Analysis And condition Issue.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;Eric&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765744#M591003</guid>
      <dc:creator>erric3210</dc:creator>
      <dc:date>2024-11-16T17:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765787#M591004</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14069"&gt;@erric3210&lt;/a&gt;&amp;nbsp; I don't think set analysis will work here but you can try below expression&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=concat( aggr(if(only({&amp;lt;Flag={'Daily'}&amp;gt;}Value)*1e10 + Only({&amp;lt;Flag={'Daily'}&amp;gt;}Units) *1e4 =
max(total aggr(only({&amp;lt;Flag={'Daily'}&amp;gt;}Value)*1e10 + Only({&amp;lt;Flag={'Daily'}&amp;gt;}Units) *1e4, Product, Flag)), Product),
Product, Flag),',')&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Dec 2020 16:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765787#M591004</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-02T16:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765808#M591005</link>
      <description>&lt;P&gt;Hi Kush,&lt;/P&gt;&lt;P&gt;Thanks for the reply. is there any chance to populate result using Set Analysis.&lt;/P&gt;&lt;P&gt;As per my knowledge, we can't use Possible() function inside if condition. I need to use that.&lt;/P&gt;&lt;P&gt;Also, why there is a need to multiply with number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,.&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 21:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765808#M591005</guid>
      <dc:creator>erric3210</dc:creator>
      <dc:date>2020-12-02T21:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765850#M591006</link>
      <description>&lt;P&gt;try this:&lt;BR /&gt;&lt;BR /&gt;sum({&amp;lt;Units={$(= max({&amp;lt;Value={$(=max({&amp;lt;Flag={"Daily"}&amp;gt;}Value))}&amp;gt;}Units))}&amp;gt;}Units)&lt;/P&gt;&lt;P&gt;it means get product where units is equal to the maximum unit where value is equal to the maximum value.&amp;nbsp; if there is only one product with max value, then the maximum unit would be the one for that product.&amp;nbsp; in your example, if milk and soap both had 10 units they would both be selected&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 21:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765850#M591006</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-02T21:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765851#M591007</link>
      <description>&lt;P&gt;or for your concat:&lt;BR /&gt;&lt;BR /&gt;=concat( distinct {&amp;lt;Units={$(= max({&amp;lt;Value={$(=max({&amp;lt;Flag={"Daily"}&amp;gt;}Value))}&amp;gt;}Units))}&amp;gt;}Product,',')&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 21:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765851#M591007</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-02T21:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765859#M591008</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14069"&gt;@erric3210&lt;/a&gt;&amp;nbsp; As I said set analysis won't work here because set evaluates once per chart . So if any chance you are able to find the Max Units for max values but that Max Units will be applied to all the products no matter there is a max value or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you still want to use the set analysis then mix of script solution I can suggest but again there is limitation as you won't get calculation dynamically.&lt;/P&gt;&lt;P&gt;If you could share why you want to use possible then I would try to accommodate in if statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 22:07:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765859#M591008</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-02T22:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765878#M591009</link>
      <description>&lt;P&gt;it is possible to use set analysis only using the expression i posted&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 00:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765878#M591009</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-03T00:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765913#M591010</link>
      <description>&lt;P&gt;HI Edwin,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Your shared expression won't give desired output because it is bringing one value in the Set expression.&lt;/P&gt;&lt;P&gt;So, your set expression is populating value 10 (Units={'10'}) inside the expression. This will fail if other products have same 10 units. I want result based on both value and units.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;Concat(DISTINCT {&amp;lt;Units={'250'},Value={'10'}&amp;gt;}Product) or,&lt;/P&gt;&lt;P&gt;Concat(DISTINCT {&amp;lt;Units={'250'}&amp;gt;*&amp;lt;Value={'10'}&amp;gt;}Product)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 08:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765913#M591010</guid>
      <dc:creator>erric3210</dc:creator>
      <dc:date>2020-12-03T08:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765925#M591011</link>
      <description>&lt;P&gt;Hi Kush,&lt;/P&gt;&lt;P&gt;Thanks for all the clarification and explaining the theoretical part of Set analysis.&lt;/P&gt;&lt;P&gt;It was very helpful. I'm trying to achieve result by modifying yours &amp;amp; Edwin solution.&lt;/P&gt;&lt;P&gt;Hope that works.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 12:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765925#M591011</guid>
      <dc:creator>erric3210</dc:creator>
      <dc:date>2020-12-03T12:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765926#M591012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I modified both of your expressions and I'm achieving the desired output using this:&lt;/P&gt;&lt;P&gt;=CONCAT(DISTINCT {&amp;lt;Value={$(=MAX({$&amp;lt;Flag={'Daily'}&amp;gt;}Value))}&amp;gt;*&amp;lt;Units={$(= max({&amp;lt;Value={$(=max({&amp;lt;Flag={"Daily"}&amp;gt;}Value))}&amp;gt;}Units))}&amp;gt;}Product,',')&lt;/P&gt;&lt;P&gt;This is considering both scenarios.&lt;/P&gt;&lt;P&gt;Please correct me if I'm wrong here and also let me know whether this is the feasible solution or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 09:25:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765926#M591012</guid>
      <dc:creator>erric3210</dc:creator>
      <dc:date>2020-12-03T09:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765956#M591013</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14069"&gt;@erric3210&lt;/a&gt;&amp;nbsp; expression seems to be working. But you need to test it out in your actual dataset&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765956#M591013</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-03T11:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765981#M591014</link>
      <description>&lt;P&gt;i must admit you are on the right track and that i should have tested more scenarios.&amp;nbsp; at the end of the day, set analysis will boil down to just what was inside the last $().&amp;nbsp; but you need to add the check for Flag as if weekly has value=250 and unit of 10 it will be picked up.:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=CONCAT(DISTINCT {&amp;lt;&lt;STRONG&gt;Flag={'Daily'}&lt;/STRONG&gt;, Value={$(=MAX({$&amp;lt;Flag={'Daily'}&amp;gt;}Value))}&amp;gt;*&amp;lt;&lt;STRONG&gt;Flag={'Daily'},&lt;/STRONG&gt; Units={$(= max({&amp;lt;Value={$(=max({&amp;lt;Flag={"Daily"}&amp;gt;}Value))}&amp;gt;}Units))}&amp;gt;}Product,',')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 12:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765981#M591014</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-03T12:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765983#M591015</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14069"&gt;@erric3210&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i must admit you are on the right track and that i should have tested more scenarios.&amp;nbsp; at the end of the day, set analysis will boil down to just what was inside the last $().&amp;nbsp; but you need to add the check for Flag as if weekly has value=250 and unit of 10 it will be picked up.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=CONCAT(DISTINCT {&amp;lt;&lt;STRONG&gt;Flag={'Daily'}&lt;/STRONG&gt;, Value={$(=MAX({$&amp;lt;Flag={'Daily'}&amp;gt;}Value))}&amp;gt;*&amp;lt;&lt;STRONG&gt;Flag={'Daily'},&lt;/STRONG&gt;&amp;nbsp;Units={$(= max({&amp;lt;Value={$(=max({&amp;lt;Flag={"Daily"}&amp;gt;}Value))}&amp;gt;}Units))}&amp;gt;}Product,',')&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 12:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765983#M591015</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-03T12:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765987#M591016</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14069"&gt;@erric3210&lt;/a&gt;&amp;nbsp; i went back to your original post and i think the proper way is:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=CONCAT(DISTINCT {&amp;lt;&lt;/SPAN&gt;Flag={'Daily'}&lt;SPAN&gt;, Value={$(=MAX({$&amp;lt;Flag={'Daily'}&amp;gt;}Value))}&lt;/SPAN&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Units={$(= max({&amp;lt;Value={$(=max({&amp;lt;Flag={"Daily"}&amp;gt;}Value))}&amp;gt;}Units))}&amp;gt;}Product,',')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;since separating the modifiers by comma is already an AND operation.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 12:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1765987#M591016</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-03T12:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis And Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1766120#M591017</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for correcting the expression.&lt;/P&gt;&lt;P&gt;I really appreciate all your help.&lt;/P&gt;&lt;P&gt;I was great learning for me.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eric&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 21:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-And-Condition/m-p/1766120#M591017</guid>
      <dc:creator>erric3210</dc:creator>
      <dc:date>2020-12-03T21:24:41Z</dc:date>
    </item>
  </channel>
</rss>

