<?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: Crossed Sales Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341644#M126170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, sure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requests:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;store, produt, RequestQty, RequestDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, a, 2,'06-03-2012'&lt;/P&gt;&lt;P&gt;1, b, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, c, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'08-03-2012'&lt;/P&gt;&lt;P&gt;2, c, 1,'08-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'10-03-2012'&lt;/P&gt;&lt;P&gt;2, d, 1,'06-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 2,'06-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'20-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'20-03-2012'&lt;/P&gt;&lt;P&gt;3, b, 1,'22-03-2012'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;store, produt, SalesQty, SalesDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, a, 2,'09-03-2012'&lt;/P&gt;&lt;P&gt;1, a, 1,'06-03-2012'&lt;/P&gt;&lt;P&gt;1, b, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, c, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'01-03-2012'&lt;/P&gt;&lt;P&gt;2, c, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'10-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'16-03-2012'&lt;/P&gt;&lt;P&gt;2, d, 1,'16-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 2,'17-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'19-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'20-03-2012'&lt;/P&gt;&lt;P&gt;3, b, 1,'21-03-2012'&lt;/P&gt;&lt;P&gt;3, b, 1,'24-03-2012'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And my doc qvw looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="12785" alt="CrossedSales.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/12785_CrossedSales.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;indeed there 2 requests on 20-3-2012 but why it "&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt; joined the single sale twice onto the end, and count it twice" as you said??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cafc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Apr 2012 19:19:51 GMT</pubDate>
    <dc:creator>cafcptg2011</dc:creator>
    <dc:date>2012-04-07T19:19:51Z</dc:date>
    <item>
      <title>Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341640#M126166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with crossed sales (as I called).&lt;/P&gt;&lt;P&gt;I have 2 tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - one is about the sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - the other one is about the requests&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what I need is to get sales after request dates of the produt "a", like I show in my third table.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Crossed sales problem.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/12776_Crossed+sales+problem.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After 06-03-2012 request I have 4 sales and after 20-03-2012 I have 1 sale. Can anyone help me please to accomplish this, until now didn't figure out one way to get the correct results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cafc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I have attached a qvw with my tables to understand better the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 14:59:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341640#M126166</guid>
      <dc:creator>cafcptg2011</dc:creator>
      <dc:date>2012-04-07T14:59:48Z</dc:date>
    </item>
    <item>
      <title>Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341641#M126167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi cafc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use a nested if statment in the expression to work out how many sales were after the request date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(if(SalesDate &amp;gt;= RequestDate,Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 15:41:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341641#M126167</guid>
      <dc:creator />
      <dc:date>2012-04-07T15:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341642#M126168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all thanks for your reply. I have tried your solution :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="12782" alt="Crossed sales problem1.jpg" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/12782_Crossed+sales+problem1.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sales quantity after 06-03-2012 request date are 4 sales indeed and it is correct.&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;But I don't understand why gives 2 sales quantity after 20-03-2012, it should be 1 sale quantity and not 2, rigth?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;&lt;P&gt;cafc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 17:29:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341642#M126168</guid>
      <dc:creator>cafcptg2011</dc:creator>
      <dc:date>2012-04-07T17:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341643#M126169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sadly I can't open your document as I am at home and only have the trial version, so I can only speculate &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is unusual that it is returning 2. What is the source data like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the request date data looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Request Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Requests&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20/03/12&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20/03/12&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Then it might join the single sale twice onto the end, and count it twice, if you know what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HMMM!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give me an idea of what the source tables look like so I can try it here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 19:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341643#M126169</guid>
      <dc:creator />
      <dc:date>2012-04-07T19:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341644#M126170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, sure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requests:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;store, produt, RequestQty, RequestDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, a, 2,'06-03-2012'&lt;/P&gt;&lt;P&gt;1, b, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, c, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'08-03-2012'&lt;/P&gt;&lt;P&gt;2, c, 1,'08-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'10-03-2012'&lt;/P&gt;&lt;P&gt;2, d, 1,'06-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 2,'06-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'20-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'20-03-2012'&lt;/P&gt;&lt;P&gt;3, b, 1,'22-03-2012'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;store, produt, SalesQty, SalesDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, a, 2,'09-03-2012'&lt;/P&gt;&lt;P&gt;1, a, 1,'06-03-2012'&lt;/P&gt;&lt;P&gt;1, b, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, c, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'03-03-2012'&lt;/P&gt;&lt;P&gt;1, d, 1,'01-03-2012'&lt;/P&gt;&lt;P&gt;2, c, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'09-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'10-03-2012'&lt;/P&gt;&lt;P&gt;2, a, 1,'16-03-2012'&lt;/P&gt;&lt;P&gt;2, d, 1,'16-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 2,'17-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'19-03-2012'&lt;/P&gt;&lt;P&gt;3, a, 1,'20-03-2012'&lt;/P&gt;&lt;P&gt;3, b, 1,'21-03-2012'&lt;/P&gt;&lt;P&gt;3, b, 1,'24-03-2012'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And my doc qvw looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="12785" alt="CrossedSales.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/12785_CrossedSales.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;indeed there 2 requests on 20-3-2012 but why it "&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt; joined the single sale twice onto the end, and count it twice" as you said??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cafc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 19:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341644#M126170</guid>
      <dc:creator>cafcptg2011</dc:creator>
      <dc:date>2012-04-07T19:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341645#M126171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm bumping this back up because it's had me stumped, even when I tried to replicate it at home! Set analysis doesn't work either &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any one else have any insight? Of Cafc did you solve the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 12:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341645#M126171</guid>
      <dc:creator />
      <dc:date>2012-04-15T12:45:31Z</dc:date>
    </item>
    <item>
      <title>Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341646#M126172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(aggr(if(SalesDate &amp;gt;= RequestDate,SalesQty),RequestDate,SalesDate))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression in the Sales after Requests table chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 13:10:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341646#M126172</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-04-15T13:10:19Z</dc:date>
    </item>
    <item>
      <title>Crossed Sales Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341647#M126173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PERFECT!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks both of you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 13:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Crossed-Sales-Problem/m-p/341647#M126173</guid>
      <dc:creator>cafcptg2011</dc:creator>
      <dc:date>2012-04-15T13:45:03Z</dc:date>
    </item>
  </channel>
</rss>

