<?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: Expression Stopped Working after Weeks in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Stopped-Working-after-Weeks/m-p/462908#M484105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be good idea to share your application here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jun 2013 22:43:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-11T22:43:07Z</dc:date>
    <item>
      <title>Expression Stopped Working after Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Stopped-Working-after-Weeks/m-p/462907#M484104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an application over HR data that uses a metric for Average Headcount by week. I had the calculations all validated out and published to our server for the better part of a month and then I noticed that they stopped working.&amp;nbsp; The even stranger thing is that they are so similar yet in QV 10 SR3 and QV 11 SR2 the first one calculates and the second does not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My calculation for a chart over current selections is the following and it yields results. [First Chart] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(AGGR(&lt;/P&gt;&lt;P&gt;COUNT({$&amp;lt;[Employee Status]={'Active'},RECORD_ID= P({$&amp;lt;FISCAL_YEAR={'*'}&amp;gt;})&amp;gt;}DISTINCT [Employee ID])&lt;/P&gt;&lt;P&gt;,[Location Name],Shift,FISCAL_WEEK&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;COUNT({&amp;lt;$(='[' &amp;amp; concat({&amp;lt;$Table={"AllEmployees"}&amp;gt;}$Field,']=,[') &amp;amp; ']=')&amp;gt;}DISTINCT FISCAL_WEEK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second chart is the same metric over the same month selected the year prior. [Second Chart]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(AGGR(&lt;/P&gt;&lt;P&gt;COUNT({$&amp;lt;[Employee Status]={'Active'}&lt;/P&gt;&lt;P&gt;,Date=,FISCAL_MONTH=,FISCAL_QUARTER=,FISCAL_MONTH_NO={$(=Only(FISCAL_MONTH_NO))},FISCAL_YEAR={$(=Only(RIGHT(TRIM(FISCAL_MONTH),4))-1)}&lt;/P&gt;&lt;P&gt;&amp;gt;}DISTINCT [Employee ID])&lt;/P&gt;&lt;P&gt;,[Location Name],Shift,FISCAL_WEEK&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;COUNT({&amp;lt;$(='[' &amp;amp; concat({&amp;lt;$Table={"AllEmployees"}&amp;gt;}$Field,']=,[') &amp;amp; ']=')&amp;gt;}DISTINCT FISCAL_WEEK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="42511" class="jive-image-thumbnail jive-image" onclick="" alt="Headcount.png" src="https://community.qlik.com/legacyfs/online/42511_Headcount.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried troubleshooting the expression from the second chart with no luck. The denominator seemed to calculate fine by itself. For the numerator I tried substituting my set analysis with FISCAL_MONTH_NO = {2} and FISCAL_YEAR = {2013} directly and it still didn't work. None of the fields in my numerator have null values in the data. I saw an unanswered thread about dual types and I changed my FISCAL_MONTH back to a TEXT only and that didn't help. I tried wrapping all my fields in brackets and that didn't work. I tried the following which is completely simplified and un-dynamic and it yields a zero as well. When I comment out the date fields portion it works. Also when i undo my date selections it works. This is even after I convert all of the date fields to text and trim them. It seems like QV is unable to override or remove the date selections. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(AGGR(&lt;/P&gt;&lt;P&gt;COUNT(&lt;/P&gt;&lt;P&gt;{$&amp;lt;[FISCAL_QUARTER] = {'QTR 1 2012'},[FISCAL_MONTH] = {'March 2012'},[FISCAL_YEAR] = {'2012'},&lt;/P&gt;&lt;P&gt;[Employee Status]={'Active'}&amp;gt;}&lt;/P&gt;&lt;P&gt;DISTINCT [Employee ID])&lt;/P&gt;&lt;P&gt;,[Location Name],Shift,FISCAL_WEEK&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: My application consists of two data tables, one that has all changes to employment data 'AllEmployees' and a calendar table for fiscal calendar information 'Calendar'. ALSO, neither the first or second chart calc for that metric in 11.2 SR2 but yield null signs instead of zeros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 22:29:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Stopped-Working-after-Weeks/m-p/462907#M484104</guid>
      <dc:creator />
      <dc:date>2013-06-11T22:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Stopped Working after Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Stopped-Working-after-Weeks/m-p/462908#M484105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be good idea to share your application here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 22:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Stopped-Working-after-Weeks/m-p/462908#M484105</guid>
      <dc:creator />
      <dc:date>2013-06-11T22:43:07Z</dc:date>
    </item>
  </channel>
</rss>

