<?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 question, more elegant solution? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-question-more-elegant-solution/m-p/1419534#M33647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just looking at the expression makes it difficult to see what is going on, but one suggestion I can make is to convert Rank1, Rank2, .... Rank17 into a field and its value in another field using &lt;A href="https://community.qlik.com/qlik-blogpost/3628"&gt;The Crosstable Load&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2017 16:37:57 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-09-14T16:37:57Z</dc:date>
    <item>
      <title>Set analysis question, more elegant solution?</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-question-more-elegant-solution/m-p/1419533#M33646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wondering if anyone has a more elegant solution to the below.&lt;/P&gt;&lt;P&gt;17 set analysis scenarios, to return 'Rank' field numbers, and then finding the minimum 'Rank' field number within the resulting range of fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(len(If(Only({1&amp;lt;ID = p({&amp;lt;Genre =&amp;nbsp; (p(Genre)), [Sub Genre] = (p([Sub Genre])),&lt;BR /&gt;Literal3 = (p(Literal3)), &lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN =&amp;gt;})&amp;gt;}Aggr(Rank(Only({1&amp;lt;ID = p({&amp;lt;Genre =&amp;nbsp; (p(Genre)), [Sub Genre] = (p([Sub Genre])),&lt;BR /&gt;Literal3 = (p(Literal3)), &lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title = , ISBN = &amp;gt;})&amp;gt;}-ID)), Genre, [Sub Genre], Literal3, ID)) &amp;lt;= $(vResults),&lt;BR /&gt;concat(TOTAL &amp;lt;Genre, [Sub Genre], Literal3&amp;gt; ID,',')))&amp;gt;0,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If(Only({1&amp;lt;ID = p({&amp;lt;Genre =&amp;nbsp; (p(Genre)), [Sub Genre] = (p([Sub Genre])),&lt;BR /&gt;Literal3 = (p(Literal3)), &lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title = , ISBN = &amp;gt;})&lt;/P&gt;&lt;P&gt;&amp;gt;}Aggr(Rank(Only({1&amp;lt;ID = p({&amp;lt;Genre =&amp;nbsp; (p(Genre)), [Sub Genre] = (p([Sub Genre])),&lt;BR /&gt;Literal3 = (p(Literal3)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title = , ISBN = &amp;gt;})&amp;gt;}-ID)), &lt;/P&gt;&lt;P&gt;Genre, [Sub Genre], Literal3, ID)) &amp;lt;= $(vResults),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;rangemin(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//One&lt;/STRONG&gt;&lt;BR /&gt;num(only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj2_code = (p(bisac_sbj2_code)),bisac_sbj3_code = (p(bisac_sbj3_code)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank1))&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Two&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj2_code = (p(bisac_sbj2_code)),bisac_sbj3_code = (p(bisac_sbj3_code)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank2)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Three&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj2_code = (p(bisac_sbj2_code)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),Level3_Literal1Literal3 = (p(Level3_Literal1Literal3)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank3)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Four&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj2_code = (p(bisac_sbj2_code)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank4)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Five&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj2_code = (p(bisac_sbj2_code)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank5)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Six&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj3_code = (p(bisac_sbj3_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),Level2_Literal1Literal3 = (p(Level2_Literal1Literal3)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank6)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Seven&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj3_code = (p(bisac_sbj3_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank7)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Eight&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),bisac_sbj3_code = (p(bisac_sbj3_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank8)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Nine&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),Level2_Literal1Literal3 = (p(Level2_Literal1Literal3)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),Level3_Literal1Literal3 = (p(Level3_Literal1Literal3)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank9)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Ten&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),Level2_Literal1Literal3 = (p(Level2_Literal1Literal3)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank10)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Eleven&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),Level2_Literal1Literal3 = (p(Level2_Literal1Literal3)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank11)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Twelve&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),Level3_Literal1Literal3 = (p(Level3_Literal1Literal3)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank12)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Thirteen&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank13)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Fourteen&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),Level2_Literal2 = (p(Level2_Literal2)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank14)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Fiveteen&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),Level3_Literal1Literal3 = (p(Level3_Literal1Literal3)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank15)&lt;BR /&gt;,&lt;BR /&gt;&lt;STRONG&gt;//Sixteen&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),Level3_Literal2 = (p(Level3_Literal2)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank16)&lt;BR /&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;//Seventeen&lt;/STRONG&gt;&lt;BR /&gt;only({1&amp;lt;ID = p({&amp;lt;bisac_sbj1_code = (p(bisac_sbj1_code)),&lt;BR /&gt;Level2_Literal1 = (p(Level2_Literal1)),&lt;BR /&gt;Level3_Literal1 = (p(Level3_Literal1)),&lt;BR /&gt;[Price] = {"&amp;gt;=$(vMinCTPrice)&amp;lt;=$(vMaxCTPrice)"},&lt;BR /&gt;[Pub Date Num] = {"&amp;gt;=$(vMinCTPubDate)&amp;lt;=$(vMaxCTPubDate)"},&lt;BR /&gt;ID = e(ID),Author = , Title =, ISBN = &amp;gt;})&amp;gt;}Rank17)&lt;SPAN style="color: #0000ff;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;,null()),null())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 16:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-question-more-elegant-solution/m-p/1419533#M33646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-14T16:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question, more elegant solution?</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-question-more-elegant-solution/m-p/1419534#M33647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just looking at the expression makes it difficult to see what is going on, but one suggestion I can make is to convert Rank1, Rank2, .... Rank17 into a field and its value in another field using &lt;A href="https://community.qlik.com/qlik-blogpost/3628"&gt;The Crosstable Load&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 16:37:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-question-more-elegant-solution/m-p/1419534#M33647</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-14T16:37:57Z</dc:date>
    </item>
  </channel>
</rss>

