<?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 within Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566224#M441752</link>
    <description>&lt;P&gt;As ever,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18624"&gt;@Gysbert_Wassenaar&lt;/a&gt;&amp;nbsp;has given a great solution for this. Just to add that if you want to get a total of that expression you will need to use an AGGR. You are perhaps unlikely to want to get a total price, but if you want a total value it would look like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(aggr(FirstSortedValue({&amp;lt;Status={1}&amp;gt;}Price, Priority*1000000+Price) * Quantity,Material))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you use this in a table which has Price, Priority and Status in the value will appear against an arbitrary row, rather than against the one which has the Status and the lowest Priority. If you are using this expression ensure you don't have those other fields as dimensions.&lt;/P&gt;&lt;P&gt;The section on AGGR on help.qlik.com should illuminate why the above is needed and works.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2019 07:42:12 GMT</pubDate>
    <dc:creator>stevedark</dc:creator>
    <dc:date>2019-04-08T07:42:12Z</dc:date>
    <item>
      <title>Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566039#M441727</link>
      <description>&lt;P&gt;I've got the following problem:&lt;/P&gt;&lt;P&gt;I need the price of a materail which is Status=1 and is the lowest price with the lowest priority.&lt;/P&gt;&lt;P&gt;I tried everything and searched through the community but I didn't find the right solution. &lt;IMG id="mansad" class="emoticon emoticon-mansad" src="https://10.236.46.65/i/smilies/16x16_man-sad.png" alt="Man Sad" title="Man Sad" /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-04-06 10_49_46-Qlik Sense Desktop.png"&gt;&lt;img src="https://community.qlik.com/skins/images/EBC1E3E90D489BE68BA1EFEA9A38FC1A/responsive_peak/images/image_not_found.png" alt="2019-04-06 10_49_46-Qlik Sense Desktop.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Input:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Material, Priority, Price, Status&lt;BR /&gt;A, 1, 30, 2&lt;BR /&gt;A, 2, 20, 1&lt;BR /&gt;A, 2, 30, 1&lt;BR /&gt;A, 3, 10, 3&lt;BR /&gt;A, 1, 20, 1&lt;BR /&gt;B, 3, 40, 1&lt;BR /&gt;B, 2, 70, 5&lt;BR /&gt;B, 1, 80, 1&lt;BR /&gt;B, 1, 50, 1&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566039#M441727</guid>
      <dc:creator>ManuelRühl</dc:creator>
      <dc:date>2024-11-16T03:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566066#M441730</link>
      <description>&lt;P&gt;Does it need to respond to selections when identifying the lowest priority?&lt;/P&gt;&lt;P&gt;If not, I would look at doing something in the load script like this:&lt;/P&gt;&lt;P&gt;MyData:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; Material &amp;amp;'-'&amp;amp; num(Priority, '0000') as MaterialPriorityKey,&lt;BR /&gt;&amp;nbsp; Material,Priority,Status&lt;BR /&gt;etc...&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp;1 as IsLowest,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;MinString(MaterialPriorityKey)&lt;BR /&gt;RESIDENT MyData&lt;BR /&gt;WHERE Status = 1&lt;BR /&gt;GROUP BY Material&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;That would then give you a flag you could then use in Set Analysis, like this: {&amp;lt;IsLowest={1}&amp;gt;}&lt;/P&gt;&lt;P&gt;If you wanted it to be dependent on selections, so if you selected Priorty 2 it would then give you that price as it would then be the lowest it gets a bit more messy. Let me know if you need to go there...&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2019 21:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566066#M441730</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2019-04-06T21:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566141#M441737</link>
      <description>Thank you very much for your answer! In this case, it would be fine to do so in the script. But the main question for me and behind this post is: How can I do set analysis which includes dynamic selections per line? Another requirement is, to sum up the average turnover of the last 5 orders of a customer. Of course I could solve that within the script as well, but then it doesn't depend on the actual selection any more. Can you give ma hint?</description>
      <pubDate>Sun, 07 Apr 2019 15:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566141#M441737</guid>
      <dc:creator>ManuelRühl</dc:creator>
      <dc:date>2019-04-07T15:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566143#M441738</link>
      <description>With your example data this should do the trick: FirstSortedValue({&amp;lt;Status={1}&amp;gt;}Price, Priority*1000000+Price)</description>
      <pubDate>Sun, 07 Apr 2019 16:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566143#M441738</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2019-04-07T16:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566224#M441752</link>
      <description>&lt;P&gt;As ever,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18624"&gt;@Gysbert_Wassenaar&lt;/a&gt;&amp;nbsp;has given a great solution for this. Just to add that if you want to get a total of that expression you will need to use an AGGR. You are perhaps unlikely to want to get a total price, but if you want a total value it would look like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(aggr(FirstSortedValue({&amp;lt;Status={1}&amp;gt;}Price, Priority*1000000+Price) * Quantity,Material))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you use this in a table which has Price, Priority and Status in the value will appear against an arbitrary row, rather than against the one which has the Status and the lowest Priority. If you are using this expression ensure you don't have those other fields as dimensions.&lt;/P&gt;&lt;P&gt;The section on AGGR on help.qlik.com should illuminate why the above is needed and works.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 07:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566224#M441752</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2019-04-08T07:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566285#M441760</link>
      <description>Creating a field like&lt;BR /&gt;&lt;BR /&gt;load * ,&lt;BR /&gt;Priority &amp;amp; Status as Key&lt;BR /&gt;from table ;&lt;BR /&gt;&lt;BR /&gt;and use expression min(TOTAL&amp;lt;Material&amp;gt; {&amp;lt;Key={'11'}&amp;gt;}Price)</description>
      <pubDate>Mon, 08 Apr 2019 09:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566285#M441760</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2019-04-08T09:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566433#M441781</link>
      <description>&lt;P&gt;Thanks a lot for all the solutions!&lt;/P&gt;&lt;P&gt;The answer of&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18624"&gt;@Gysbert_Wassenaar&lt;/a&gt; was the easiest one, but the other one without scripting provided by &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6748"&gt;@stevedark&lt;/a&gt; worked as well!&lt;/P&gt;&lt;P&gt;I try to get on with it with my problem summing up the last 5 orders per customer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 13:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566433#M441781</guid>
      <dc:creator>ManuelRühl</dc:creator>
      <dc:date>2019-04-08T13:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566566#M441788</link>
      <description>&lt;P&gt;The important difference between the two solutions is what happens when selections are made. Test to ensure you get the solution you want.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-within-Set-Analysis/m-p/1566566#M441788</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2019-04-08T18:12:07Z</dc:date>
    </item>
  </channel>
</rss>

