<?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 Performance expression issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performance-expression-issue/m-p/1374679#M419732</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;I try to create a chart displaying number of distinct customers with 3 conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Past two years depending the start date chosen by users (there is also an end date but used for other charts and expressions) i would like to count:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Distinct customers with only one order during this period&lt;/P&gt;&lt;P&gt;- First order made past year&lt;/P&gt;&lt;P&gt;- Never been VIP during this period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(DISTINCT {&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;}&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;Aggr(count( DISTINCT {&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;} [Order Id]), [Customer Id])=1&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;Aggr(min({&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;} [&lt;SPAN style="font-size: 13.3333px;"&gt;Order Date&lt;/SPAN&gt;]), [&lt;SPAN style="font-size: 13.3333px;"&gt;Customer Id&lt;/SPAN&gt;]) &amp;gt;= vLastYear&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;Aggr(max ({&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;} [Is VIP]), [Customer Id])=0&lt;/P&gt;&lt;P&gt;, [Customer Id]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's working but it's very slow, i need to wait more than 30 sec when i change the Start Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My model is very simple, it's just a table with four fields ( Customer Id, Order Date, Is VIP, Order ID) and 3 millions rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I think the main cause of this poor performance is my server configuration.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's running on VM with 4 CPU and 12GB RAM, the processor is an Intel Xeon CPU E5-2640 0 2.50 GHz.&lt;/P&gt;&lt;P&gt;QV version : QlikView 11.2 SR10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice to impove my expression ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2017 07:21:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-08-24T07:21:58Z</dc:date>
    <item>
      <title>Performance expression issue</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-expression-issue/m-p/1374679#M419732</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;I try to create a chart displaying number of distinct customers with 3 conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Past two years depending the start date chosen by users (there is also an end date but used for other charts and expressions) i would like to count:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Distinct customers with only one order during this period&lt;/P&gt;&lt;P&gt;- First order made past year&lt;/P&gt;&lt;P&gt;- Never been VIP during this period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(DISTINCT {&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;}&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;Aggr(count( DISTINCT {&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;} [Order Id]), [Customer Id])=1&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;Aggr(min({&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;} [&lt;SPAN style="font-size: 13.3333px;"&gt;Order Date&lt;/SPAN&gt;]), [&lt;SPAN style="font-size: 13.3333px;"&gt;Customer Id&lt;/SPAN&gt;]) &amp;gt;= vLastYear&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;Aggr(max ({&amp;lt;[Order Date]={"&amp;gt;$(vLast2Years) &amp;lt;$(vStartDate)"}&amp;gt;} [Is VIP]), [Customer Id])=0&lt;/P&gt;&lt;P&gt;, [Customer Id]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's working but it's very slow, i need to wait more than 30 sec when i change the Start Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My model is very simple, it's just a table with four fields ( Customer Id, Order Date, Is VIP, Order ID) and 3 millions rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I think the main cause of this poor performance is my server configuration.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's running on VM with 4 CPU and 12GB RAM, the processor is an Intel Xeon CPU E5-2640 0 2.50 GHz.&lt;/P&gt;&lt;P&gt;QV version : QlikView 11.2 SR10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice to impove my expression ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 07:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-expression-issue/m-p/1374679#M419732</guid>
      <dc:creator />
      <dc:date>2017-08-24T07:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Performance expression issue</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-expression-issue/m-p/1374680#M419733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry I cannot help with the question itself, but I wouldn't be convinced that it's the server configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a small QlikView application on my server (4x10 CPU at 2.8GHz, 512GB RAM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Against my advice (and our best practices), this application contains multiple embedded IF expressions with aggregations, as well as calculated dimensions and formatting of similar complexity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not only is the solution slow, it only take 5 concurrent users before I see an impact on the QlikView Server performance as a whole.&amp;nbsp; I can actually watch CPU usage spike when users make filter selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to isolate the problematic expressions now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2017 15:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-expression-issue/m-p/1374680#M419733</guid>
      <dc:creator>greg-anderson</dc:creator>
      <dc:date>2017-09-21T15:37:14Z</dc:date>
    </item>
  </channel>
</rss>

