<?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 Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754782#M471999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuck with probably something stupid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a straight table with the dimension limits option.&lt;/P&gt;&lt;P&gt;I want to show the top 10 (can be changed through a variable) with the total of the top 10 but also the total of the whole / total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good. I have added a screenshot below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77239_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem that I have is that for the total of the whole / total I use the 'Show total' option in the Dimension Limits&lt;/P&gt;&lt;P&gt;and for the total of the Top 10 I use the Total Mode 'Sum of Rows' of the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for the column Index LYTD (which is a comparison of sales with Sales LY * 100) the calculation is correct for the whole / total but not for the Top 10. In my screenshot I use the Total Mode 'Expression Total' (which is not correct) but I cannot use Sum or Average of Rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outcome must be 172.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Feb 2015 17:32:15 GMT</pubDate>
    <dc:creator>jjordaan</dc:creator>
    <dc:date>2015-02-05T17:32:15Z</dc:date>
    <item>
      <title>Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754782#M471999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuck with probably something stupid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a straight table with the dimension limits option.&lt;/P&gt;&lt;P&gt;I want to show the top 10 (can be changed through a variable) with the total of the top 10 but also the total of the whole / total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good. I have added a screenshot below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77239_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem that I have is that for the total of the whole / total I use the 'Show total' option in the Dimension Limits&lt;/P&gt;&lt;P&gt;and for the total of the Top 10 I use the Total Mode 'Sum of Rows' of the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for the column Index LYTD (which is a comparison of sales with Sales LY * 100) the calculation is correct for the whole / total but not for the Top 10. In my screenshot I use the Total Mode 'Expression Total' (which is not correct) but I cannot use Sum or Average of Rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outcome must be 172.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 17:32:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754782#M471999</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-02-05T17:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754783#M472000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you will need some kind of calculated aggregation with aggr() and/or the TOTAL-qualifier instead the Total-Mode of the table, see here various examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="/t5/forums/searchpage/tab/message?q=straight table total aggr&amp;amp;type=document"&gt;http://community.qlik.com/search.jspa?q=straight+table+total+aggr&amp;amp;type=document&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 20:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754783#M472000</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-05T20:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754784#M472001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot see how I can combine the total of the whole with the total of the Top 10 in one column of the straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 20:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754784#M472001</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-02-05T20:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754785#M472002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope someone has an idea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 10:48:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754785#M472002</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-02-06T10:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754786#M472003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you can use if statement like&lt;/P&gt;&lt;P&gt;if(rowno()=0, your custom expression to get outcome of 172 ,Index LYTD) in your expression.&lt;/P&gt;&lt;P&gt;rowno()=0 will check whether the current row is total row or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nandkishor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 11:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754786#M472003</guid>
      <dc:creator />
      <dc:date>2015-02-06T11:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754787#M472004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nandkishor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your idea but unfortunately is does not work.&lt;/P&gt;&lt;P&gt;I think it doesn't identify de total of the top 10 as RowNo 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 11:34:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754787#M472004</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-02-06T11:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754788#M472005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u provide me the sample qvw and expression so that I can try it out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 11:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754788#M472005</guid>
      <dc:creator />
      <dc:date>2015-02-06T11:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754789#M472006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nandkishor pandirkar&lt;SPAN&gt; is right you will need to use an expression which queries the rowno and the differ the calculation. Important is that you couldn't use the inbuild qv-functionalities for top - you will have to create this with a calculated dimension with hidden null-values like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(aggr(rank(sum({&amp;lt; Year = {2013}&amp;gt;} Sales)), item)&amp;lt;=10, Item)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use expressions like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(rowno() = 11, sum({1&amp;lt; Year= {2014}&amp;gt;} total Sales), &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt; Year= {2014}&amp;gt;} Sales)) / &lt;BR /&gt;if(rowno() = 11, sum({1&amp;lt; Year= {2013}&amp;gt;} total Sales), &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt; Year = {2013}&amp;gt;} Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course you could make these expressions with Year = {"$(=max(year)-1)"} and/or variables for rowno() and rank dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 11:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754789#M472006</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-02-06T11:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sum of rows of column 1 with sum of rows column 2 in straight table with dimension limits</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754790#M472007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hi Nandkishor,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I said that your RowNumber idea didn't work but I did something wrong so it did work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank you very much for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;@Marcus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank you also for your help.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 12:02:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sum-of-rows-of-column-1-with-sum-of-rows-column-2-in/m-p/754790#M472007</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-02-06T12:02:00Z</dc:date>
    </item>
  </channel>
</rss>

