<?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 Expression Query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/1510102#M601633</link>
    <description>&lt;P&gt;Good day all,&lt;/P&gt;&lt;P&gt;I am new to Qlikview and need your expert help please.&lt;/P&gt;&lt;P&gt;I need to write an expression that looks at the sales order (and if duplicate then to only assign "1" to the sales order, then to add up the average cost per unit by the no of loads. Currently when writing this expression:&lt;/P&gt;&lt;P&gt;Sum([Avg Cost Per Unit])/Sum(TOTAL [No of Loads])&lt;/P&gt;&lt;P&gt;the problem is that the "No of Loads" is adding up to 4 (in the below data set example) where in fact it is one load just different products on the same order.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be done with an expression or do i need to do this manually for the thousands of line items in my data set?&lt;/P&gt;&lt;P&gt;Example Data Set:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/690i043102B1DDBC2508/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help in advance.&lt;/P&gt;&lt;P&gt;Joanne&lt;/P&gt;</description>
    <pubDate>Wed, 21 Nov 2018 05:17:44 GMT</pubDate>
    <dc:creator>joanneandrews</dc:creator>
    <dc:date>2018-11-21T05:17:44Z</dc:date>
    <item>
      <title>Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/1510102#M601633</link>
      <description>&lt;P&gt;Good day all,&lt;/P&gt;&lt;P&gt;I am new to Qlikview and need your expert help please.&lt;/P&gt;&lt;P&gt;I need to write an expression that looks at the sales order (and if duplicate then to only assign "1" to the sales order, then to add up the average cost per unit by the no of loads. Currently when writing this expression:&lt;/P&gt;&lt;P&gt;Sum([Avg Cost Per Unit])/Sum(TOTAL [No of Loads])&lt;/P&gt;&lt;P&gt;the problem is that the "No of Loads" is adding up to 4 (in the below data set example) where in fact it is one load just different products on the same order.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be done with an expression or do i need to do this manually for the thousands of line items in my data set?&lt;/P&gt;&lt;P&gt;Example Data Set:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/690i043102B1DDBC2508/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help in advance.&lt;/P&gt;&lt;P&gt;Joanne&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 05:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/1510102#M601633</guid>
      <dc:creator>joanneandrews</dc:creator>
      <dc:date>2018-11-21T05:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/1510105#M601634</link>
      <description>&lt;P&gt;You could probably use DISTINCT qualifier in the expression, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum([Avg Cost Per Unit])/Sum(&lt;STRONG&gt;Distinct&lt;/STRONG&gt; TOTAL [No of Loads])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 05:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/1510105#M601634</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-11-21T05:41:21Z</dc:date>
    </item>
  </channel>
</rss>

