<?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 To - Help with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290963#M1194763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i found the ans to the error. here is the formaula which works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;= Count ( {1&amp;lt;SO_KNA1.Customer = {"=Sum({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustLost))&amp;lt;=$(=Date(vEvalDate))'} &amp;gt;} COPADAY.EURNetSales) &amp;lt; 0"}&amp;gt;} Distinct SO_KNA1.Customer )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have another query. Can you tell me what I am doing wrong in the below query. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;SPAN style="font-size: 10pt; font-family: Helv;"&gt;What I am trying to do is get a count of customers if their sales during one time period is less than 30% of the average sales between another time period where again the time periods are defined within variables. The part I added to the above formula is in red&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helv;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helv;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 2; font-family: Helv;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;= Count ( {1&amp;lt;SO_KNA1.Customer = {"=Sum({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustNew))&amp;lt;=$(=Date(vEvalDate))'} &amp;gt;} COPADAY.EURNetSales &amp;lt; &lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Helv;"&gt;(0.3*(Avg({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustRisky))&amp;lt;=$(=Date(vEvalDate)))'} &amp;gt;} COPADAY.EURNetSales)))&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;"}&amp;gt;} Distinct SO_KNA1.Customer )&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2011 13:16:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-17T13:16:03Z</dc:date>
    <item>
      <title>How To - Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290959#M1194759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I get some help here with a QV expression I am struggling with. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a count of all Customers who have had no sales between a specific time period (from and to date). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have defined the from and two dates as variables (vCustLost and vEvalDate). I tried the below formula but the value is shown always as zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Count ( {1&amp;lt;SO_KNA1.Customer = {"=Sum({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustLost))&amp;lt;=$(=Date(vEvalDate))'} COPADAY.EURNetSales) &amp;lt; 0"}&amp;gt;} Distinct SO_KNA1.Customer )&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;Table Key:&lt;/P&gt;&lt;P dir="ltr"&gt;SO_KNA1.Customer = Customer Account Number&lt;/P&gt;&lt;P dir="ltr"&gt;%POSTDATE = Sales Recognition Date&lt;/P&gt;&lt;P dir="ltr"&gt;COPADAY.EURNetSales = Sales Value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 16:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290959#M1194759</guid>
      <dc:creator />
      <dc:date>2011-06-15T16:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: How To - Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290960#M1194760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like just syntax errors to me.&amp;nbsp; If your variables are really dates, I think this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;count({1&amp;lt;SO_KNA1.Customer={&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;"&lt;/SPAN&gt;=sum({1&amp;lt;%POSTDATE={&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;gt;=&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;$(vCustLost)&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;$(vEvalDate)"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;} COPADAY.EURNetSales)&amp;lt;0"}&amp;gt;} distinct SO_KNA1.Customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they're really numbers, I think this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;count({1&amp;lt;SO_KNA1.Customer={"=sum({1&amp;lt;%POSTDATE={&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;gt;=$(=Date(&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;$(&lt;/STRONG&gt;&lt;/SPAN&gt;vCustLost&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;))&amp;lt;=$(=Date(&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;$(&lt;/STRONG&gt;&lt;/SPAN&gt;vEvalDate&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;))&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;"}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;} COPADAY.EURNetSales)&amp;lt;0"}&amp;gt;} distinct SO_KNA1.Customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 17:30:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290960#M1194760</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-15T17:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: How To - Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290961#M1194761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response but this still shows a syntax error. Both of them still show a Syntax error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 13:46:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290961#M1194761</guid>
      <dc:creator />
      <dc:date>2011-06-16T13:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How To - Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290962#M1194762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you able to post the application?&amp;nbsp; You can scramble the information if it's sensitive.&amp;nbsp; I've never done it, but it looks like you can do it under document properties -&amp;gt; scrambling.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 16:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290962#M1194762</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-16T16:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How To - Help with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290963#M1194763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i found the ans to the error. here is the formaula which works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;= Count ( {1&amp;lt;SO_KNA1.Customer = {"=Sum({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustLost))&amp;lt;=$(=Date(vEvalDate))'} &amp;gt;} COPADAY.EURNetSales) &amp;lt; 0"}&amp;gt;} Distinct SO_KNA1.Customer )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have another query. Can you tell me what I am doing wrong in the below query. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;SPAN style="font-size: 10pt; font-family: Helv;"&gt;What I am trying to do is get a count of customers if their sales during one time period is less than 30% of the average sales between another time period where again the time periods are defined within variables. The part I added to the above formula is in red&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helv;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helv;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 2; font-family: Helv;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;= Count ( {1&amp;lt;SO_KNA1.Customer = {"=Sum({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustNew))&amp;lt;=$(=Date(vEvalDate))'} &amp;gt;} COPADAY.EURNetSales &amp;lt; &lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Helv;"&gt;(0.3*(Avg({1&amp;lt;%POSTDATE = {'&amp;gt;=$(=Date(vCustRisky))&amp;lt;=$(=Date(vEvalDate)))'} &amp;gt;} COPADAY.EURNetSales)))&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN style="font-family: Helv; color: #0000ff; font-size: 10pt;"&gt;"}&amp;gt;} Distinct SO_KNA1.Customer )&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 13:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Help-with-Set-Analysis/m-p/290963#M1194763</guid>
      <dc:creator />
      <dc:date>2011-06-17T13:16:03Z</dc:date>
    </item>
  </channel>
</rss>

