<?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: Union and Rank (crossed sales) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409722#M490739</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, it seems to work with my model. I still have to complete your expression to get extra results, but the main part is ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cédric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB: if you have any idea about an other discussion I opened last week...&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/265535#265535"&gt;http://community.qlik.com/message/265535#265535&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2012 12:35:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-15T12:35:18Z</dc:date>
    <item>
      <title>Union and Rank (crossed sales)</title>
      <link>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409718#M490735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to study some crossed sales phenomenons but need help on the philosophical direction that should be chosen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a product list in a straight table and would like to display as an expression the best product that is being sold together with each product.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="23404" class="jive-image-thumbnail jive-image" onclick="" alt="Union.jpg" src="https://community.qlik.com/legacyfs/online/23404_Union.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;For exemple: &lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="97" style="border: 1px solid rgb(0, 0, 0); width: 229px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;Product&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;Best product sold&lt;BR /&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I don't know how to start my expression. Aggr + rank ? P in set analysis ? Both ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any help will be thankful !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cédric.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 15:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409718#M490735</guid>
      <dc:creator />
      <dc:date>2012-10-12T15:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Union and Rank (crossed sales)</title>
      <link>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409719#M490736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This example has much more than you need in it, but it was easier for me to add your chart to an existing example than to build a new example.&amp;nbsp; I'm using firstsortedvalue() to pick the best match from the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; Heh, oops.&amp;nbsp; That's right.&amp;nbsp; When firstsortedvalue finds more than one match it returns null.&amp;nbsp; On the other hand, I'm not sure what you'd want to see in that case.&amp;nbsp; Both products&amp;nbsp; concatenated?&amp;nbsp; Something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit 2: Never mind.&amp;nbsp; I really should have looked at the chart before posting.&amp;nbsp; It's just not working.&amp;nbsp; I'll try to fix it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 20:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409719#M490736</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-12T20:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Union and Rank (crossed sales)</title>
      <link>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409720#M490737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I think it's working now, though it's even more complex.&amp;nbsp; You can see that if two products have the same ranking, we show both of them.&amp;nbsp; If the product isn't bought with anything else, we show nothing.&amp;nbsp; The data model plays a big part, but with the data model as I've set it up, the expression for the most common second product is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;concat(aggr(if(rank("Count")=1,"Second Product"),"Product","Second Product"),', ')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 21:59:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409720#M490737</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-12T21:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Union and Rank (crossed sales)</title>
      <link>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409721#M490738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer and for the example. I will try to adapt your expressions to my model and let you know if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cédric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 09:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409721#M490738</guid>
      <dc:creator />
      <dc:date>2012-10-15T09:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Union and Rank (crossed sales)</title>
      <link>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409722#M490739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, it seems to work with my model. I still have to complete your expression to get extra results, but the main part is ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cédric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB: if you have any idea about an other discussion I opened last week...&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/265535#265535"&gt;http://community.qlik.com/message/265535#265535&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 12:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-and-Rank-crossed-sales/m-p/409722#M490739</guid>
      <dc:creator />
      <dc:date>2012-10-15T12:35:18Z</dc:date>
    </item>
  </channel>
</rss>

