<?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 Error in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460267#M795460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm trying to get a variable of average worked days.&lt;BR /&gt;The formula I'm currently using in the pivot tables is Cycle3_stop - Cycle1_start - Count({&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date) and it works. &lt;BR /&gt;I've tried to set that variable with Avg(Aggr(Count({&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date))) but I get an error in expression.&lt;/P&gt;&lt;P&gt;Any ideas what might be wrong or how can I calculate the average in a variable with a better expression?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460267#M795460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm trying to get a variable of average worked days.&lt;BR /&gt;The formula I'm currently using in the pivot tables is Cycle3_stop - Cycle1_start - Count({&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date) and it works. &lt;BR /&gt;I've tried to set that variable with Avg(Aggr(Count({&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date))) but I get an error in expression.&lt;/P&gt;&lt;P&gt;Any ideas what might be wrong or how can I calculate the average in a variable with a better expression?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460267#M795460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460268#M795461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be just 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;EM&gt;Avg({&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date)&lt;/EM&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;Or, you have to put a dimension with aggr() against which you want the aggregation to work, like:&lt;/SPAN&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;Avg(Aggr(Count({&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date) &lt;STRONG&gt;,&lt;/STRONG&gt; &lt;STRONG&gt;YourDimension&lt;/STRONG&gt;))&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 08:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460268#M795461</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-01-08T08:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460269#M795462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;you can try like below,&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count(aggr(avg({$&amp;lt;nome = {'Attività non lavorative'}&amp;gt;} distinct assign_date),Dimension1, Dimension2))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;p.s: remember to update dimension 1 &amp;amp; 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also check this article,&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3208"&gt;Average – Which average?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If still not working share your mock data and expected output. tks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 08:34:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460269#M795462</guid>
      <dc:creator>devarasu07</dc:creator>
      <dc:date>2018-01-08T08:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460270#M795463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I forgot to add the dimension on which I need the aggregation to work &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 08:38:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-expression/m-p/1460270#M795463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T08:38:35Z</dc:date>
    </item>
  </channel>
</rss>

