<?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 Total / Sum of Rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151181#M29092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having trouble with uploading the qlikview file....I'll keep trying but in the mean time here is the script for my problem above.&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[Prices]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Item,Commodity,StdPrice&lt;BR /&gt;'1234' , 'ELECTRICAL',0.00&lt;BR /&gt;'3426' , 'PLUMBING',2.23&lt;BR /&gt;'7852' , 'PLUMBING',0.00&lt;BR /&gt;'7755' , 'PLUMBING',0.00&lt;BR /&gt;'6565' , 'PLUMBING',798.52&lt;BR /&gt;'2020' , 'ELECTRICAL',0.00&lt;BR /&gt;'5252' , 'ELECTRICAL',0.00&lt;BR /&gt;'4565' , 'ELECTRICAL',2.22&lt;BR /&gt;'3555' , 'ELECTRICAL',0.75&lt;BR /&gt;'4625' , 'JANITORIAL',0.00&lt;BR /&gt;'5253' , 'JANITORIAL',0.00&lt;BR /&gt;'4566' , 'JANITORIAL',0.00&lt;BR /&gt;'3557' , 'JANITORIAL',0.00&lt;BR /&gt;'4622' , 'JANITORIAL',0.00&lt;BR /&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2009 23:28:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-05T23:28:42Z</dc:date>
    <item>
      <title>Expression Total / Sum of Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151180#M29091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys, I'm struggling with writing an expression such that expression total is exactly equal to sum of rows.&lt;/P&gt;&lt;P&gt;I have 3 elements - Item, Commodity, Std Price. I created a straight table chart with Commodity as a dimension. I have 3 expressions -&lt;/P&gt;&lt;P&gt;First one is the Count of Items for each commodity &lt;STRONG&gt;Count(Item)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Second one is the Count of Items with Std Price &amp;gt; 0 &lt;STRONG&gt;sum(If(StdPrice = 0.00,0,1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Third one has two conditions. Items should have Std Price = 0 and the commodity that the item belongs should have atleast one item with Std Price &amp;gt; 0&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(If(sum(total&amp;lt;Commodity&amp;gt; If(StdPrice = 0,0,1))&amp;gt;0,1,0) &amp;gt; 0,&lt;BR /&gt;sum(total&amp;lt;Commodity&amp;gt; If(StdPrice&amp;gt; 0,0,1)),0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It is working as expected at the individual commodity level. But at the summary level, it is not right. Please help with the formula for the third expression (WithoutStd_WithCommodity) so that the summary on the top is 5 and not 10.&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 23:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151180#M29091</guid>
      <dc:creator />
      <dc:date>2009-08-05T23:18:45Z</dc:date>
    </item>
    <item>
      <title>Expression Total / Sum of Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151181#M29092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having trouble with uploading the qlikview file....I'll keep trying but in the mean time here is the script for my problem above.&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[Prices]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Item,Commodity,StdPrice&lt;BR /&gt;'1234' , 'ELECTRICAL',0.00&lt;BR /&gt;'3426' , 'PLUMBING',2.23&lt;BR /&gt;'7852' , 'PLUMBING',0.00&lt;BR /&gt;'7755' , 'PLUMBING',0.00&lt;BR /&gt;'6565' , 'PLUMBING',798.52&lt;BR /&gt;'2020' , 'ELECTRICAL',0.00&lt;BR /&gt;'5252' , 'ELECTRICAL',0.00&lt;BR /&gt;'4565' , 'ELECTRICAL',2.22&lt;BR /&gt;'3555' , 'ELECTRICAL',0.75&lt;BR /&gt;'4625' , 'JANITORIAL',0.00&lt;BR /&gt;'5253' , 'JANITORIAL',0.00&lt;BR /&gt;'4566' , 'JANITORIAL',0.00&lt;BR /&gt;'3557' , 'JANITORIAL',0.00&lt;BR /&gt;'4622' , 'JANITORIAL',0.00&lt;BR /&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 23:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151181#M29092</guid>
      <dc:creator />
      <dc:date>2009-08-05T23:28:42Z</dc:date>
    </item>
    <item>
      <title>Expression Total / Sum of Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151182#M29093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out guys....I need to embed the whole expression within an aggr and a sum function...&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;aggr(&lt;/P&gt;&lt;P&gt;If(If(sum(total&amp;lt;Commodity&amp;gt; If(StdPrice = 0,0,1))&amp;gt;0,1,0) &amp;gt; 0,&lt;BR /&gt;sum(total&amp;lt;Commodity&amp;gt; If(StdPrice&amp;gt; 0,0,1)),0)&lt;/P&gt;&lt;P&gt;,Commodity)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 01:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-Sum-of-Rows/m-p/151182#M29093</guid>
      <dc:creator />
      <dc:date>2009-08-06T01:52:51Z</dc:date>
    </item>
  </channel>
</rss>

