<?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 Create expression that will output sum of dimension rows without including dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459432#M171495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a list of data that has muliple rows for each title based on different categories such as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUBLISHER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOOK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CATEGORY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PAGES&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I group this data by PUBLISHER and BOOK, I use the 'sum (distinct Pages)' command to get the real page count per BOOK.&amp;nbsp; In this case it would be 10 total pages for Book A and 20 total pages for Book B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I attempt to group everything by just PUBLISHER and not include BOOK in the straight table, I get a total of 30 pages for Book A and 20 pages for Book B, which is obviously incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can I create an expression the will sum the pages without double counting the pages due to the categories in each row?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Oct 2012 21:30:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-26T21:30:12Z</dc:date>
    <item>
      <title>Create expression that will output sum of dimension rows without including dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459432#M171495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a list of data that has muliple rows for each title based on different categories such as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUBLISHER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOOK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CATEGORY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PAGES&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;Publisher A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Book B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I group this data by PUBLISHER and BOOK, I use the 'sum (distinct Pages)' command to get the real page count per BOOK.&amp;nbsp; In this case it would be 10 total pages for Book A and 20 total pages for Book B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I attempt to group everything by just PUBLISHER and not include BOOK in the straight table, I get a total of 30 pages for Book A and 20 pages for Book B, which is obviously incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can I create an expression the will sum the pages without double counting the pages due to the categories in each row?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 21:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459432#M171495</guid>
      <dc:creator />
      <dc:date>2012-10-26T21:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create expression that will output sum of dimension rows without including dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459433#M171496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We probably need also to know how the fields are related to each other in your data model.&lt;/P&gt;&lt;P&gt;For example, do you have a table with BOOK and PAGES, and another table with PUBLISHER, BOOK and CATEGORY?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what are you trying to achieve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I attempt to group everything by just PUBLISHER and not include BOOK in the straight table, I get a total of 30 pages for Book A and 20 pages for Book B, which is obviously incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't really understand this. How do you get results for Book A and Book B, if you don't include these as dimensions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 21:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459433#M171496</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-26T21:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create expression that will output sum of dimension rows without including dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459434#M171497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data is as it appears, in a excel spreadsheet... so one row for every publisher/book/category combination&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are right... I misspoke... in the example above I get a total of 90 pages when I include just the Publisher and not the Book or Category in the straight table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2012 01:16:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459434#M171497</guid>
      <dc:creator />
      <dc:date>2012-10-27T01:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create expression that will output sum of dimension rows without including dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459435#M171498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I figured it out.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a straight table with just the PUBLISHER as a dimension, I create the following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(sum(distinct PAGES), BOOK))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2012 02:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459435#M171498</guid>
      <dc:creator />
      <dc:date>2012-10-27T02:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create expression that will output sum of dimension rows without including dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459436#M171499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can simply use sum(distinct PAGES) when Publisher is ur only dimension&lt;/P&gt;&lt;P&gt;no need of aggregation !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2012 03:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459436#M171499</guid>
      <dc:creator />
      <dc:date>2012-10-27T03:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create expression that will output sum of dimension rows without including dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459437#M171500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are possibly multiple books per Publisher with same number of PAGES, so I wouldn't recommend that (though it works for the sample given).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as far as I understand, one and the same book should have an unambiguous number of pages, so I also would not use &lt;EM&gt;sum(distinct PAGES)&lt;/EM&gt; per book. I would just use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(aggr( only(PAGES), BOOK))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or &lt;EM&gt;sum(aggr(PAGES, BOOK))&lt;/EM&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have different number of pages per book, this book will not included in the calculation, while with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #737373; background-color: #ffffff; font-family: Arial;"&gt;sum(aggr(sum(distinct PAGES), BOOK))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the book will be included multiple times, for each distinct occurence of PAGES. Not sure what you need here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2012 11:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-expression-that-will-output-sum-of-dimension-rows-without/m-p/459437#M171500</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-27T11:36:29Z</dc:date>
    </item>
  </channel>
</rss>

