<?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: inventory of a product based on the orders in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1697371#M725902</link>
    <description>&lt;P&gt;to get the correct statues i used below one.&lt;/P&gt;&lt;P&gt;if(remaining&amp;gt;0 or (remaining=0 and Above(remaining)=orders), 'order completed',&lt;/P&gt;&lt;P&gt;if(remaining&amp;lt;0 and Above(remaining)=0,'closed',&lt;/P&gt;&lt;P&gt;if(remaining&amp;lt;0, 'Partially completed',&lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt;and i achieved the same output in frontend by using the below expression.&lt;/P&gt;&lt;P&gt;=if(aggr(RowNo(),prodid,ordid)=1, [units]-[orders],&lt;/P&gt;&lt;P&gt;if(aggr(RowNo(),prodid,ordid)&amp;gt;1,above(remaining)-orders)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2020 11:49:36 GMT</pubDate>
    <dc:creator>Navars</dc:creator>
    <dc:date>2020-04-28T11:49:36Z</dc:date>
    <item>
      <title>inventory of a product based on the orders</title>
      <link>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1694596#M725899</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to calculate the Inventory of the products based on its orders.&lt;/P&gt;&lt;P&gt;eg. in the source file, product P1 has total units has 30, its first order (Order id 1) has ordered 15 units so the remaining units of Prod P1 has 15, we call it as the order is completed. (30-15=15)&lt;/P&gt;&lt;P&gt;in the second-order&amp;nbsp;&amp;nbsp;(Order id 2) it ordered 20 units, but we have 15 units only (15-20 =-5) partially completed.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in the third-order&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(Order id 3)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;it ordered 15 units, but we don't have units to give hence we canceled the order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Sra1&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1694596#M725899</guid>
      <dc:creator>Navars</dc:creator>
      <dc:date>2024-11-16T00:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: inventory of a product based on the orders</title>
      <link>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1694613#M725900</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this code.&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD prodid,&lt;BR /&gt;ordid,&lt;BR /&gt;[noof orders],&lt;BR /&gt;[total units],&lt;BR /&gt;AutoNumber(RowNo(),prodid) as Rownum&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Users\Kaushik\Downloads\inventory.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Left join (Data)&lt;BR /&gt;Load prodid, Sum([total units]) as [Overall Units]&lt;BR /&gt;Resident Data Group by prodid;&lt;/P&gt;&lt;P&gt;Data1:&lt;BR /&gt;Load *,If([Remaining Units]&amp;gt;0,'Completed',If([Remaining Units]&amp;lt;0,'Partial Completed','Cancelled')) as Status;&lt;BR /&gt;Load *,If(Rownum=1,[Overall Units]-[noof orders],If(peek([Remaining Units]) &amp;lt;=0,0,peek([Remaining Units])-[noof orders])) as [Remaining Units]&lt;BR /&gt;Resident Data Order by prodid,ordid;&lt;/P&gt;&lt;P&gt;Drop table Data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output is as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 822px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32071iA4CC75C36AFE2F3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 18:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1694613#M725900</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-04-18T18:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: inventory of a product based on the orders</title>
      <link>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1694848#M725901</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Kaushik,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;by using your logic I am getting the expected result. but in one case Status is not populating properly.&lt;/P&gt;&lt;P&gt;product P2 has total units 25 and order received 25, it supposed to show as completed status and remaining units as zero. but its showing Cancelled as the status.&lt;/P&gt;&lt;P&gt;I have attached the sample data, need to check the Product P2 for the above scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sra1&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 09:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1694848#M725901</guid>
      <dc:creator>Navars</dc:creator>
      <dc:date>2020-04-20T09:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: inventory of a product based on the orders</title>
      <link>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1697371#M725902</link>
      <description>&lt;P&gt;to get the correct statues i used below one.&lt;/P&gt;&lt;P&gt;if(remaining&amp;gt;0 or (remaining=0 and Above(remaining)=orders), 'order completed',&lt;/P&gt;&lt;P&gt;if(remaining&amp;lt;0 and Above(remaining)=0,'closed',&lt;/P&gt;&lt;P&gt;if(remaining&amp;lt;0, 'Partially completed',&lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt;and i achieved the same output in frontend by using the below expression.&lt;/P&gt;&lt;P&gt;=if(aggr(RowNo(),prodid,ordid)=1, [units]-[orders],&lt;/P&gt;&lt;P&gt;if(aggr(RowNo(),prodid,ordid)&amp;gt;1,above(remaining)-orders)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 11:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inventory-of-a-product-based-on-the-orders/m-p/1697371#M725902</guid>
      <dc:creator>Navars</dc:creator>
      <dc:date>2020-04-28T11:49:36Z</dc:date>
    </item>
  </channel>
</rss>

