<?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: Sum based on another dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750133#M1035080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have inserted an Example qvw. I want to count the Products that have no Sales for the ProductCategory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2015 13:33:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-22T13:33:12Z</dc:date>
    <item>
      <title>Sum based on another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750131#M1035077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;Hi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;I have a problem about an if statement and sum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;I have a table where I want to create an expression called "Product with no Sales " with a flag of 1 or 0 if another expression called "Sales" is 0. Then I want to sum "Product with no Sales" on the dimension ProductCategory but based on how many Products in that category that has "Sales" = 0 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;Example: How many Products have sum(Sales)=0. Then I want to sum "Product with no Sales" on the dimension ProductCategory. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;This is how I want to present it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="3" style="border: 1pt solid black; border-image: none; width: 100%; mso-cellspacing: 2.2pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 0cm 0cm 0cm;"&gt;&lt;TBODY&gt;&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;"&gt;&lt;TD style="background: #6690bc; padding: 1.2pt; border: #000000;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P align="center" style="margin: 0cm 0cm 0pt; text-align: center;"&gt;&lt;SPAN style="color: white; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;&lt;STRONG&gt;ProductCategory&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="background: #6690bc; padding: 1.2pt; border: #000000;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P align="center" style="margin: 0cm 0cm 0pt; text-align: center;"&gt;&lt;SPAN style="color: white; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="background: #6690bc; padding: 1.2pt; border: #000000; text-align: left;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P align="center" style="margin: 0cm 0cm 0pt; text-align: center;"&gt;&lt;SPAN style="color: white; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;&lt;STRONG&gt;Product with no Sales&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="mso-yfti-irow: 1;"&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;ProductCategory1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;100&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="mso-yfti-irow: 2;"&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;ProductCategory2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;400&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="mso-yfti-irow: 3; mso-yfti-lastrow: yes;"&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;ProductCategory3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;600&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 1.2pt; border: #000000; background-color: transparent;" valign="bottom"&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;In this example 2 of the products in ProductCategory1 has Sales=0 and the other products in that category has a total sum of 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;I don't get the expression for "Product with no Sales" to work,&amp;nbsp; if(sum(Sales)=0, 1, 0) because I want it on the product level&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-ansi-language: EN-GB;"&gt;Anyone that has an idea how to do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meddelandet redigerades av: Fredrik Nilsson&#xD;
&#xD;
I have inserted an example file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 12:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750131#M1035077</guid>
      <dc:creator />
      <dc:date>2015-01-22T12:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750132#M1035078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post your data or file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 12:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750132#M1035078</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-01-22T12:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750133#M1035080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have inserted an Example qvw. I want to count the Products that have no Sales for the ProductCategory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 13:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750133#M1035080</guid>
      <dc:creator />
      <dc:date>2015-01-22T13:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750134#M1035081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this out. If this is not what you just let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 13:39:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750134#M1035081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-22T13:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum based on another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750135#M1035082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;count({&amp;lt;Sales={''},ProductCategory&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 13:51:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-based-on-another-dimension/m-p/750135#M1035082</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-01-22T13:51:13Z</dc:date>
    </item>
  </channel>
</rss>

