<?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 Counter problem with Sales_Order_Detail vs Sales_Order in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167009#M38743</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4 Hours Sleep and the following seem to have solved my problem.&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;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&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;/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;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;INNER&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;JOIN&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;P&gt;SalesOrderID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;B&gt;Distinct&lt;/B&gt; if(ShipDate - DueDate &amp;gt;0 ,1,0) ) &lt;B&gt;AS&lt;/B&gt; LateShipCounter&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;RESIDENT&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;OrderDetail&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;GROUP&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;BY&lt;/B&gt; SalesOrderID; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Never mind unless oyu have a better way to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 May 2010 17:28:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-27T17:28:21Z</dc:date>
    <item>
      <title>Counter problem with Sales_Order_Detail vs Sales_Order</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167008#M38742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am tring to set up a counter and group of buckets to track late shipments. The ship date and due date reside in the sales_order_detail table.&lt;/P&gt;&lt;P&gt;I set up the following during my load:&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;if( (ShipDate-DueDate) &amp;gt;0,(ShipDate-DueDate),0) &lt;B&gt;AS&lt;/B&gt; DaysShipLate, &lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ShipDate - DueDate &amp;gt;0 ,1,0) &lt;B&gt;AS&lt;/B&gt; LateShipCounter,&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The DaysShipLate works great with Class() to set up buckets but when I try to sum the LateShipCounter, I get a wrong number because the oders have multiple lines from the order detail. I know I need to use the order ID only for this but I get a LateShipCounter of 1 for each line item in the order. How can I get only one counter for each order ? I have tried aggr, leftjoins, contatenate (possibly not correctly) without sucess. Am I moving in the right direction? Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 07:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167008#M38742</guid>
      <dc:creator />
      <dc:date>2010-05-27T07:52:14Z</dc:date>
    </item>
    <item>
      <title>Counter problem with Sales_Order_Detail vs Sales_Order</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167009#M38743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4 Hours Sleep and the following seem to have solved my problem.&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;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&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;/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;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;INNER&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;JOIN&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;P&gt;SalesOrderID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;B&gt;Distinct&lt;/B&gt; if(ShipDate - DueDate &amp;gt;0 ,1,0) ) &lt;B&gt;AS&lt;/B&gt; LateShipCounter&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;RESIDENT&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;OrderDetail&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;GROUP&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;BY&lt;/B&gt; SalesOrderID; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Never mind unless oyu have a better way to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 17:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167009#M38743</guid>
      <dc:creator />
      <dc:date>2010-05-27T17:28:21Z</dc:date>
    </item>
    <item>
      <title>Counter problem with Sales_Order_Detail vs Sales_Order</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167010#M38744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4 Hours Sleep and the following seem to have solved my problem.&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;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&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;/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;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;INNER&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;JOIN&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;P&gt;SalesOrderID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;B&gt;Distinct&lt;/B&gt; if(ShipDate - DueDate &amp;gt;0 ,1,0) ) &lt;B&gt;AS&lt;/B&gt; LateShipCounter&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;RESIDENT&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;OrderDetail&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;GROUP&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;BY&lt;/B&gt; SalesOrderID; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Never mind unless oyu have a better way to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 17:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-problem-with-Sales-Order-Detail-vs-Sales-Order/m-p/167010#M38744</guid>
      <dc:creator />
      <dc:date>2010-05-27T17:28:22Z</dc:date>
    </item>
  </channel>
</rss>

