<?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: Counting dimension in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10928#M1729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&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;STRONG&gt;Sum({$&amp;lt;code={"&amp;gt;1"}, cusno = {"=Sum(sales) &amp;gt; 0"}&amp;gt;} cuscounter)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2018 17:13:39 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-02-13T17:13:39Z</dc:date>
    <item>
      <title>Counting dimension in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10924#M1725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Hi all, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;I am trying to find a way to show the number of customers that went up and down in turnover per country (or other dimension) vs same period last year. I have two charts, one for turnover per countries which went up and another one for countries which went down in turnover. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;This is the expression I use for displaying the turnover for countries that have increased in turnover vs same period last year ([&lt;SPAN style="font-size: 13.3333px;"&gt;Netto vk] is the sales amount):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;if(sum({$ &amp;lt;Year={$(=max(Year))}, mydate={"&amp;lt;=$(=max(mydate))"}&amp;gt;} [Netto vk]) &amp;gt; sum({$ &amp;lt;Year={$(=max(Year)-1)},mydate={"&amp;lt;=$(=num(setdateyear(max(mydate),max(Year)-1)))"}&amp;gt;} [Netto vk]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;sum({$ &amp;lt;Year={$(=max(Year))}, mydate={"&amp;lt;=$(=max(mydate))"}&amp;gt;} [Netto vk])&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Instead of showing the turnover, I’d like to show the number of customers for that country that have increased and the number of customers that have decreased in turnover. Any thoughts on how I could solve this? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;I have made a flag (cuscounter) to aggregate. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Many thanks for your help! &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Arjen &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10924#M1725</guid>
      <dc:creator>arjendewolf</dc:creator>
      <dc:date>2018-02-12T15:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dimension in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10925#M1726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-style: inherit; font-size: 10pt; font-family: Arial, sans-serif; color: #575757;"&gt;if(sum({$ &amp;lt;Year={$(=max(Year))}, mydate={"&amp;lt;=$(=max(mydate))"}&amp;gt;} [Netto vk]) &amp;gt; sum({$ &amp;lt;Year={$(=max(Year)-1)},mydate={"&amp;lt;=$(=num(setdateyear(max(mydate),max(Year)-1)))"}&amp;gt;} [Netto vk]),&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-style: inherit; font-size: 10pt; font-family: Arial, sans-serif; color: #575757;"&gt;sum({$ &amp;lt;Year={$(=max(Year))}, mydate={"&amp;lt;=$(=max(mydate))"}&amp;gt;} [Netto vk])&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Arial, sans-serif; color: #575757;"&gt;&lt;STRONG&gt;), Customer)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10925#M1726</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-02-12T16:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dimension in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10926#M1727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;&lt;STRONG&gt;If(Sum({$ &amp;lt;Year = {$(=max(Year))}, mydate = {"&amp;lt;=$(=max(mydate))"}&amp;gt;} [Netto vk]) &amp;gt; Sum({$ &amp;lt;Year={$(=max(Year)-1)}, mydate = {"&amp;lt;=$(=num(setdateyear(max(mydate),max(Year)-1)))"}&amp;gt;} [Netto vk]), &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US"&gt;Count(DISTINCT {$&amp;lt;Year={$(=max(Year))}, mydate={"&amp;lt;=$(=max(mydate))"}&amp;gt;} Customers)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10926#M1727</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-12T17:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dimension in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10927#M1728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help so far! Unfortunately, this does not work, since the counting of the customers per country only happens if they have increased in turnover. I think I will have to use the P in set analysis. So i tried the following, but i'm not able to get the syntax right. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression works: sum({$ &amp;lt;code={"&amp;gt;1"}, cusno = p({&amp;lt;sales= {"&amp;gt;0"}&amp;gt;} cusno)&amp;gt;} cuscounter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to add 'sum' to the set analysis, the expressions fails: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16233a; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px;"&gt;sum({$ &amp;lt;code={"&amp;gt;1"}, cusno = p({&amp;lt;sum(sales)= {"&amp;gt;0"}&amp;gt;} cusno)&amp;gt;} cuscounter)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on this? &lt;/P&gt;&lt;P&gt;Thanks again! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 13:41:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10927#M1728</guid>
      <dc:creator>arjendewolf</dc:creator>
      <dc:date>2018-02-13T13:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dimension in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10928#M1729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&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;STRONG&gt;Sum({$&amp;lt;code={"&amp;gt;1"}, cusno = {"=Sum(sales) &amp;gt; 0"}&amp;gt;} cuscounter)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:13:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-dimension-in-expression/m-p/10928#M1729</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-13T17:13:39Z</dc:date>
    </item>
  </channel>
</rss>

