<?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: Need script advice in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321172#M118319</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've attached a sample file as well as an example of the data files.&lt;/P&gt;&lt;P&gt;Normal purchasing documents record their total value as such:&amp;gt; Item * quantity= Item price USD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But purchasing documents 41***** arent recorder in such way. instead they have several deliveries but the quantity value is still 1. So using the same formula with POs beginning with 41** actually multiplies the total sum by the count of invoice receipts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the file attached, it should give a good idea what's wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Purchase Orders.xls represents the PO total values per line items&lt;/P&gt;&lt;P&gt;-Invoice_Receipts represent the invoices posted for those Purchase orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Sep 2011 09:08:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-03T09:08:43Z</dc:date>
    <item>
      <title>Need script advice</title>
      <link>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321170#M118317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have simple fields in my script as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Purchase order document]&lt;/P&gt;&lt;P&gt;[Purchase order item]&lt;/P&gt;&lt;P&gt;[Purchase order document]&amp;amp;'/'&amp;amp;[Purchase order Item] As [PO_Item]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Item price]/[Item quantity] As [Price], &lt;/STRONG&gt;This give me the unit price of a line item from table POs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script there is also another table with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Invoice receipt],&lt;/P&gt;&lt;P&gt;[PO Number],&lt;/P&gt;&lt;P&gt;[PO Number]&amp;amp;'/'&amp;amp;[Item] As [PO_Item]&lt;/P&gt;&lt;P&gt;[Invoice Quantity]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in my table i have an expression to get the full amount of PO invoiced as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dimension: [PO_Item]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression: Sum[Invoice Quantity]*[Price]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine in all cases except with PO numbers beginning with 41*, as they dont register quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;What i would need is a calculation in the script which does the calculation &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;[Item price]/[Item quantity] As [Price], but when a PO begins with 41*, it devides the [Item price] with the amount of invoice receipts (rows).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the long, and bad explanation.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully someone can support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 07:59:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321170#M118317</guid>
      <dc:creator />
      <dc:date>2011-09-03T07:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need script advice</title>
      <link>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321171#M118318</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;As i underastand your data is some thing like 41* and the calculation not work for this i am right or wrong i am not sure. If you have any sample file if so please provide in case is 41* is not aceptable so remove it by command Purgechar( ) to remove such symbols ( * ) like =Purgechar( Yourcolumn,' * ' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 08:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321171#M118318</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-03T08:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need script advice</title>
      <link>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321172#M118319</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've attached a sample file as well as an example of the data files.&lt;/P&gt;&lt;P&gt;Normal purchasing documents record their total value as such:&amp;gt; Item * quantity= Item price USD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But purchasing documents 41***** arent recorder in such way. instead they have several deliveries but the quantity value is still 1. So using the same formula with POs beginning with 41** actually multiplies the total sum by the count of invoice receipts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the file attached, it should give a good idea what's wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Purchase Orders.xls represents the PO total values per line items&lt;/P&gt;&lt;P&gt;-Invoice_Receipts represent the invoices posted for those Purchase orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 09:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-script-advice/m-p/321172#M118319</guid>
      <dc:creator />
      <dc:date>2011-09-03T09:08:43Z</dc:date>
    </item>
  </channel>
</rss>

