<?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: Straight Table, Expression construction in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314492#M495419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the problem correctly, see attached application example and let me know if this is what you are looking for.&lt;/P&gt;&lt;P&gt;Result table in the application show sum of quantity when condition price &amp;gt;= (Avg Price – 1%) is true. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jan 2012 21:40:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-28T21:40:37Z</dc:date>
    <item>
      <title>Straight Table, Expression construction</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314491#M495418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;I have what looks to be a simple problem with a expression in a straight table. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;I might just miss the obvious – but please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Small example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;MyData:&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Load&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt; * &lt;STRONG&gt;Inline&lt;/STRONG&gt; [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;MatCode, Amount, Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;"A", 10, 80,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;"B", 20, 20, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;"B", 5, 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;I create a Straight table:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG alt="Clipboard01.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/10757_Clipboard01.jpg" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Dimension = MatCode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Expression Total Amount = sum(Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Expression Total Quantity = sum(Quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Expression Avg Price = sum(Amount) / sum(Quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Now I want an expression that sum(Quantity), but only for the records where price &amp;gt;= (Avg Price – 1%)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;In this example I would expect the new expression to give this result: A = 80&amp;nbsp;&amp;nbsp; and B = 20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-size: 10pt;"&gt;Nils&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2012 18:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314491#M495418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-28T18:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table, Expression construction</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314492#M495419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the problem correctly, see attached application example and let me know if this is what you are looking for.&lt;/P&gt;&lt;P&gt;Result table in the application show sum of quantity when condition price &amp;gt;= (Avg Price – 1%) is true. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2012 21:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314492#M495419</guid>
      <dc:creator />
      <dc:date>2012-01-28T21:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table, Expression construction</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314493#M495420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for you input. &lt;/P&gt;&lt;P&gt;This gives the correct answer, but I am looking for a more flexible solution - the full calculation made inside the expression. &lt;/P&gt;&lt;P&gt;The the calculation is made inside the expression, it will be possible to make selections on other fields on the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Nils&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2012 22:11:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314493#M495420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-28T22:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table, Expression construction</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314494#M495421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2012 22:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314494#M495421</guid>
      <dc:creator />
      <dc:date>2012-01-28T22:23:59Z</dc:date>
    </item>
    <item>
      <title>Straight Table, Expression construction</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314495#M495422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&amp;nbsp; Just what I was looking for&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2012 22:46:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Expression-construction/m-p/314495#M495422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-28T22:46:59Z</dc:date>
    </item>
  </channel>
</rss>

