<?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 Set Analysis with yearstart and yearend dates not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777691#M455009</link>
    <description>&lt;P&gt;Hi Qlik friends,&lt;/P&gt;&lt;P&gt;I have an expression that I am trying to use but keeps returning 0 (although i know data exists for the parameters. I have searched this forum and have used the syntax as per other examples but it will not work for me... can someone put me out of my misery by telling me what i am doing wrong!!&lt;/P&gt;&lt;P&gt;my expression is this:&lt;/P&gt;&lt;P&gt;=count(distinct{&amp;lt;ActivityTier={'T0'},Rag={'GREEN'},ScheduledFinishDate={"$(= '&amp;gt;=' &amp;amp; YearStart(today()) &amp;amp; '&amp;lt;=' &amp;amp; YearEnd(today()))"}&amp;gt;}[MilestoneId])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried with my ScheduledFinishDate loaded as is from the source and also loaded as a date in the script and neither seem to make any difference.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 11:59:18 GMT</pubDate>
    <dc:creator>chrismtb</dc:creator>
    <dc:date>2021-01-27T11:59:18Z</dc:date>
    <item>
      <title>Set Analysis with yearstart and yearend dates not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777691#M455009</link>
      <description>&lt;P&gt;Hi Qlik friends,&lt;/P&gt;&lt;P&gt;I have an expression that I am trying to use but keeps returning 0 (although i know data exists for the parameters. I have searched this forum and have used the syntax as per other examples but it will not work for me... can someone put me out of my misery by telling me what i am doing wrong!!&lt;/P&gt;&lt;P&gt;my expression is this:&lt;/P&gt;&lt;P&gt;=count(distinct{&amp;lt;ActivityTier={'T0'},Rag={'GREEN'},ScheduledFinishDate={"$(= '&amp;gt;=' &amp;amp; YearStart(today()) &amp;amp; '&amp;lt;=' &amp;amp; YearEnd(today()))"}&amp;gt;}[MilestoneId])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried with my ScheduledFinishDate loaded as is from the source and also loaded as a date in the script and neither seem to make any difference.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 11:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777691#M455009</guid>
      <dc:creator>chrismtb</dc:creator>
      <dc:date>2021-01-27T11:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with yearstart and yearend dates not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777737#M455011</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Not sure where you got that example from... Use below code for reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code Sample:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Sum({&amp;lt;Date = {"&amp;gt;=$(=YearStart(Today()))&amp;lt;=$(=YearEnd(Today()))"}&amp;gt;}Sales)&lt;/LI-CODE&gt;&lt;P&gt;Result:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Set Analysis Dates.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47841i156DF6A95A30A30E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Set Analysis Dates.png" alt="Set Analysis Dates.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Reference Points&lt;/U&gt; :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set Analysis - Modifier assignment&lt;BR /&gt;Numbers = {1}&lt;BR /&gt;Strings = {'This is for string assignment'}&lt;BR /&gt;Wild Cards = {"*?&amp;gt;=&amp;lt;"}&lt;/LI&gt;&lt;LI&gt;Debug your code using response from expression debugger.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Set Analysis Pro Tip.png" style="width: 411px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47842iDFF49BF006FF3A49/image-size/large?v=v2&amp;amp;px=999" role="button" title="Set Analysis Pro Tip.png" alt="Set Analysis Pro Tip.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pradeep&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 13:45:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777737#M455011</guid>
      <dc:creator>PradeepK</dc:creator>
      <dc:date>2021-01-27T13:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with yearstart and yearend dates not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777754#M455012</link>
      <description>&lt;P&gt;Thanks for the reply Pradeep.&lt;/P&gt;&lt;P&gt;The code sample I posted was actually my own, adjusted from what I had seen on the forum questions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried paring back the complexity (number of criteria I am checking against) and using the code sample you provided (with my dimensions) however I am still getting zeros.&lt;/P&gt;&lt;P&gt;I have tried both with Sum and Count functions as per the below and all still return zero values.&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;ScheduledFinishDate = {"&amp;gt;=$(=YearStart(Today()))&amp;lt;=$(=YearEnd(Today()))"}&amp;gt;}[MilestoneId])&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;ScheduledFinishDate = {"&amp;gt;=$(=YearStart(Today()))&amp;lt;=$(=YearEnd(Today()))"}&amp;gt;}[MilestoneId])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't expect the bottom to show correctly as I am trying to count the number of distinct milestones that hit a set of criteria (rather than adding together the values numeric IDs).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 14:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-yearstart-and-yearend-dates-not-working/m-p/1777754#M455012</guid>
      <dc:creator>chrismtb</dc:creator>
      <dc:date>2021-01-27T14:27:34Z</dc:date>
    </item>
  </channel>
</rss>

