<?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: calculated variable in aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207246#M387787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you define $(groupmonth)? May be you need an equal sign within the dollar sign expansion&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;=Count(DISTINCT {&amp;lt;sales={'&amp;gt;0'}&amp;gt;} name)/Aggr(NODISTINCT Count({&amp;lt;sales={'&amp;gt;0'}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DISTINCT &lt;/SPAN&gt;name),$(&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;=&lt;/SPAN&gt;groupmonth))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2016 13:48:29 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-07T13:48:29Z</dc:date>
    <item>
      <title>calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207245#M387786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this formula :&lt;/P&gt;&lt;P&gt;=count(distinct {&amp;lt;sales={'&amp;gt;0'}&amp;gt;} name)/aggr(nodistinct count({&amp;lt;sales={'&amp;gt;0'}&amp;gt;} distinct name),$(groupmonth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't work, when i use group and month&amp;nbsp; seperate &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=count(distinct {&amp;lt;sales={'&amp;gt;0'}&amp;gt;} name)/aggr(nodistinct count({&amp;lt;sales={'&amp;gt;0'}&amp;gt;} distinct name),group,month)) it works&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Probably this not a very good example, but all I want to know if it is possible to use a calculated variable this way.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 13:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207245#M387786</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-07T13:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207246#M387787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you define $(groupmonth)? May be you need an equal sign within the dollar sign expansion&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;=Count(DISTINCT {&amp;lt;sales={'&amp;gt;0'}&amp;gt;} name)/Aggr(NODISTINCT Count({&amp;lt;sales={'&amp;gt;0'}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DISTINCT &lt;/SPAN&gt;name),$(&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;=&lt;/SPAN&gt;groupmonth))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 13:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207246#M387787</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-07T13:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207247#M387788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is just a simple expression group&amp;amp;month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I group and month as a dimension in the same pivot table in which the expression is used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is from this dataset :&lt;/P&gt;&lt;P&gt;load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;month ,group,name,sales&lt;/P&gt;&lt;P&gt;jan,a,john,3000&lt;/P&gt;&lt;P&gt;jan,a,john,300&lt;/P&gt;&lt;P&gt;jan,a,carl,0&lt;/P&gt;&lt;P&gt;jan,a,dave,10&lt;/P&gt;&lt;P&gt;jan,a,mary,50&lt;/P&gt;&lt;P&gt;jan,b,justin,200&lt;/P&gt;&lt;P&gt;jan,b,justin,300&lt;/P&gt;&lt;P&gt;jan,a,boy,50&lt;/P&gt;&lt;P&gt;feb,b,pete,10&lt;/P&gt;&lt;P&gt;feb,b,pete,50&lt;/P&gt;&lt;P&gt;feb,a,john,50&lt;/P&gt;&lt;P&gt;feb,a,john,20&lt;/P&gt;&lt;P&gt;feb,a,carl,8&lt;/P&gt;&lt;P&gt;feb,a,dave,80&lt;/P&gt;&lt;P&gt;feb,a,mary,0&lt;/P&gt;&lt;P&gt;feb,b,justin,10&lt;/P&gt;&lt;P&gt;feb,b,justin,15&lt;/P&gt;&lt;P&gt;feb,a,boy,80&lt;/P&gt;&lt;P&gt;feb,b,pete,150&lt;/P&gt;&lt;P&gt;feb,b,pete,60&lt;/P&gt;&lt;P&gt;feb,b,paul,100&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, 07 Oct 2016 17:29:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207247#M387788</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-07T17:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207248#M387789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why would you combine them? Why not use group, month? Would you be able to share you logic behind trying to combine them group&amp;amp;&lt;SPAN style="font-size: 13.3333px;"&gt;month&lt;/SPAN&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:30:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207248#M387789</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-07T17:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207249#M387790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This exmple is just for testing purposes. In the app i am developing, the "groupmonth" is more complicated &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;P&gt;=(num((((left(MasterCalander.yearstring,4)))-(num(year_group)-1)),'00'))&amp;amp;right(MasterCalander.PeriodName,2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I hope you will understand I rather have a variable for this (although this expression doesn't work either in the aggr-expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207249#M387790</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-07T17:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207250#M387791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That probably won't work because aggr function expects a field which is created in the script. It doesn't allow to use a calculated dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207250#M387791</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-07T17:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207251#M387792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that answers my question . I am going to struggle on (isn't it the fun of this all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;P&gt;Thank you for your answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:49:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207251#M387792</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-07T17:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207252#M387793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem at all and sorry I didn't bring you the good news &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:55:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-aggr/m-p/1207252#M387793</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-07T17:55:30Z</dc:date>
    </item>
  </channel>
</rss>

