<?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: How do I get Sum for each column? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127618#M763326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this?&lt;/P&gt;&lt;P&gt;sum(Aggr(&lt;/P&gt;&lt;P&gt;num(num(if(count(distinct CASE#)&amp;gt;0,&lt;/P&gt;&lt;P&gt;HOURS/if(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)=1,1,&lt;/P&gt;&lt;P&gt;If(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)= HOURS,Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST),&lt;/P&gt;&lt;P&gt;(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)-1)))),0)*29,0)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;,NAME,ASSOCIATE,DATETIME))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The highlighted fields should be same as your dimensions.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2018 05:40:03 GMT</pubDate>
    <dc:creator>settu_periasamy</dc:creator>
    <dc:date>2018-07-26T05:40:03Z</dc:date>
    <item>
      <title>How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127613#M763321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get the sums for the columns per hourTotal Cartons, Total Pieces, but when I apply similar logic for Target Cartons, Target Pieces per hour, it gives me a wrong output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SS.PNG" class="jive-image image-1" height="260" src="https://community.qlik.com/legacyfs/online/208886_SS.PNG" style="height: 260px; width: 866.667px;" width="867" /&gt;&lt;/P&gt;&lt;P&gt;The formula for each row per hour are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Cartons&lt;/STRONG&gt;: Count(distinct CASE#)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total Pieces&lt;/STRONG&gt;: num(sum(UNITS#),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Target Cartons&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;num&lt;/P&gt;&lt;P&gt;(num&lt;/P&gt;&lt;P&gt;(if&lt;/P&gt;&lt;P&gt;(count(distinct CASE#)&lt;/P&gt;&lt;P&gt;&amp;gt;0,&lt;/P&gt;&lt;P&gt;HOURS/if(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)=1,1,&lt;/P&gt;&lt;P&gt;If(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)= HOURS,Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST), &lt;/P&gt;&lt;P&gt;(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)-1)))),0)*29,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Target Pieces&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;num&lt;/P&gt;&lt;P&gt;(num&lt;/P&gt;&lt;P&gt;(if&lt;/P&gt;&lt;P&gt;(sum(UNITS#)&lt;/P&gt;&lt;P&gt;&amp;gt;0,&lt;/P&gt;&lt;P&gt;HOURS/if(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)=1,1,&lt;/P&gt;&lt;P&gt;If(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)= HOURS,Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST), &lt;/P&gt;&lt;P&gt;(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)-1)))),0)*74,0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127613#M763321</guid>
      <dc:creator>haneeshmarella</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127614#M763322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What would be the expected output for target cartons and target pieces?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you try to separate the expressions and check that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127614#M763322</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2018-07-26T05:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127615#M763323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Target Cartons and Target Pieces formula for each cell of each row per hour is the expression above. THe output would be the sum of the rows for each hour, for example, in the picture, under 10 PM, the target cartons would be 29 + 25.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that answer your question, Settu? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127615#M763323</guid>
      <dc:creator>haneeshmarella</dc:creator>
      <dc:date>2018-07-26T05:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127616#M763324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to do &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(Your expression, Dim1, Dim2))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127616#M763324</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-07-26T05:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127617#M763325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried it, I get the wrong output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127617#M763325</guid>
      <dc:creator>haneeshmarella</dc:creator>
      <dc:date>2018-07-26T05:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127618#M763326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this?&lt;/P&gt;&lt;P&gt;sum(Aggr(&lt;/P&gt;&lt;P&gt;num(num(if(count(distinct CASE#)&amp;gt;0,&lt;/P&gt;&lt;P&gt;HOURS/if(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)=1,1,&lt;/P&gt;&lt;P&gt;If(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)= HOURS,Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST),&lt;/P&gt;&lt;P&gt;(Count(TOTAL &amp;lt;USER_NAME&amp;gt; DISTINCT DATE_TIME_CST)-1)))),0)*29,0)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;,NAME,ASSOCIATE,DATETIME))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;The highlighted fields should be same as your dimensions.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127618#M763326</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2018-07-26T05:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Sum for each column?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127619#M763327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works without the dimension of Associate. Thanks a lot Settu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 13:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-get-Sum-for-each-column/m-p/127619#M763327</guid>
      <dc:creator>haneeshmarella</dc:creator>
      <dc:date>2018-07-26T13:47:20Z</dc:date>
    </item>
  </channel>
</rss>

