<?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 Finding Purchase Price Based on Available Quantity in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-Purchase-Price-Based-on-Available-Quantity/m-p/1452476#M611534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello world,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't feel like reading all this, just check out the attachments. They're pretty self-explanatory. For those who share my optimism for details, they're below. Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m working on an app for a retailer that has products with varying products. I need a basic app functionality that would tell the user what was the purchase price of item that was sold on a given day. Here’s a scenario and sequence of events:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Retailer bought &lt;STRONG&gt;1 pack&lt;/STRONG&gt; of toothpaste on September 1st &lt;STRONG&gt;at $10/pack&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Retailer bought same &lt;STRONG&gt;1 pack&lt;/STRONG&gt; of toothpaste on September 15th also at &lt;STRONG&gt;$10/pack&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point, there are &lt;STRONG&gt;2 packs&lt;/STRONG&gt; of toothpaste in the inventory, each costing &lt;STRONG&gt;$10&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. On October 1st, the price went up and retailer bought another pack of toothpaste for &lt;STRONG&gt;$15/pack&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. On October 15th, retailer bought another pack of toothpaste at &lt;STRONG&gt;$15/pack&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there are 4 packs of toothpaste in the inventory, &lt;STRONG&gt;2 @ $10/pack&lt;/STRONG&gt; and &lt;STRONG&gt;2 @ $15/pack&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. Now on November 23rd, retailer &lt;STRONG&gt;sells 3 packs&lt;/STRONG&gt; of toothpaste. They sold &lt;STRONG&gt;2 packs at $12/pack&lt;/STRONG&gt; and &lt;STRONG&gt;1 pack at $17/pack&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is, &lt;STRONG&gt;how much money did they make&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My math tells me that they made a total of $6. Simple, right? ($12 x 2) + $17 = $41 (total profit from sales) minus ($10 x 2) + $15 =&lt;STRONG&gt; &lt;/STRONG&gt;$35 (total purchase price). If I’m wrong here, please tell me. I’m not too familiar with accounting&amp;nbsp; principles so I’m open to a possibility that that math is not right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simplified register file attached and an app that I have so far. The register has two tabs one where they record purchases and one where they record sales. &lt;STRONG style="text-decoration: underline;"&gt;The challenge is somehow to build a data model that’s smart enough to figure out that the first two packs of toothpaste were bought at $10/pack and not $15/pack and that the third one was bought at $15 because we ran out of packs of toothpaste that cost $10&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve put together an app with a script that I have so far. Does anyone know how this can be done? Even if not in QlikView, if you know how something like this is executed in a retail environment or some common accounting practices in this situation and you can point me to them, I’ll appreciate that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mikhail B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Nov 2017 16:33:25 GMT</pubDate>
    <dc:creator>mbespartochnyy</dc:creator>
    <dc:date>2017-11-24T16:33:25Z</dc:date>
    <item>
      <title>Finding Purchase Price Based on Available Quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-Purchase-Price-Based-on-Available-Quantity/m-p/1452476#M611534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello world,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't feel like reading all this, just check out the attachments. They're pretty self-explanatory. For those who share my optimism for details, they're below. Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m working on an app for a retailer that has products with varying products. I need a basic app functionality that would tell the user what was the purchase price of item that was sold on a given day. Here’s a scenario and sequence of events:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Retailer bought &lt;STRONG&gt;1 pack&lt;/STRONG&gt; of toothpaste on September 1st &lt;STRONG&gt;at $10/pack&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Retailer bought same &lt;STRONG&gt;1 pack&lt;/STRONG&gt; of toothpaste on September 15th also at &lt;STRONG&gt;$10/pack&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point, there are &lt;STRONG&gt;2 packs&lt;/STRONG&gt; of toothpaste in the inventory, each costing &lt;STRONG&gt;$10&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. On October 1st, the price went up and retailer bought another pack of toothpaste for &lt;STRONG&gt;$15/pack&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. On October 15th, retailer bought another pack of toothpaste at &lt;STRONG&gt;$15/pack&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there are 4 packs of toothpaste in the inventory, &lt;STRONG&gt;2 @ $10/pack&lt;/STRONG&gt; and &lt;STRONG&gt;2 @ $15/pack&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. Now on November 23rd, retailer &lt;STRONG&gt;sells 3 packs&lt;/STRONG&gt; of toothpaste. They sold &lt;STRONG&gt;2 packs at $12/pack&lt;/STRONG&gt; and &lt;STRONG&gt;1 pack at $17/pack&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is, &lt;STRONG&gt;how much money did they make&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My math tells me that they made a total of $6. Simple, right? ($12 x 2) + $17 = $41 (total profit from sales) minus ($10 x 2) + $15 =&lt;STRONG&gt; &lt;/STRONG&gt;$35 (total purchase price). If I’m wrong here, please tell me. I’m not too familiar with accounting&amp;nbsp; principles so I’m open to a possibility that that math is not right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simplified register file attached and an app that I have so far. The register has two tabs one where they record purchases and one where they record sales. &lt;STRONG style="text-decoration: underline;"&gt;The challenge is somehow to build a data model that’s smart enough to figure out that the first two packs of toothpaste were bought at $10/pack and not $15/pack and that the third one was bought at $15 because we ran out of packs of toothpaste that cost $10&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve put together an app with a script that I have so far. Does anyone know how this can be done? Even if not in QlikView, if you know how something like this is executed in a retail environment or some common accounting practices in this situation and you can point me to them, I’ll appreciate that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mikhail B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 16:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-Purchase-Price-Based-on-Available-Quantity/m-p/1452476#M611534</guid>
      <dc:creator>mbespartochnyy</dc:creator>
      <dc:date>2017-11-24T16:33:25Z</dc:date>
    </item>
  </channel>
</rss>

