<?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: Function within a Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319828#M834769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what's your date format?, are your dates dual() ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jun 2017 13:59:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-06T13:59:36Z</dc:date>
    <item>
      <title>Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319824#M834765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm new to using a set analysis and have watched a few videos, but am still having a problem getting this to work correctly.&amp;nbsp; I'm using QlikView 12, and I'm wanting to get a count of values from a year prior to the date.&amp;nbsp; Here is the formula I'm using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;[Date]={"$(=addyears([Date],-1))"}&amp;gt;}[Date])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm trying to get something that lists my Date, the Date a year ago, the count of values for the Date, and the count of values for a year ago from the Date.&amp;nbsp; Any help as to what I'm doing wrong would be greatly appreciated. &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/Function-within-a-Set-Analysis/m-p/1319824#M834765</guid>
      <dc:creator>rmooney-jvchc</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319825#M834766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Expression looks fine ...whats the error your getting ? could share the sample app ?&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319825#M834766</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-06-06T13:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319826#M834767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried set analysis builder app&lt;/P&gt;&lt;P&gt;&lt;A href="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=" title="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa="&gt;Set Analysis Wizard for QlikView | qlikblog.at&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319826#M834767</guid>
      <dc:creator>tajmohamed30</dc:creator>
      <dc:date>2017-06-06T13:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319827#M834768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Check whether you have data for that &lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;date in the last year ?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319827#M834768</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2017-06-06T13:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319828#M834769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what's your date format?, are your dates dual() ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319828#M834769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-06T13:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319829#M834770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Few things here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) May be you are not selecting a single date, or even if you are, there is no harm in adding a Max() or Min() function based on the requirement&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({$&amp;lt;[Date]={"$(=AddYears(&lt;SPAN style="color: #ff0000;"&gt;Max(&lt;/SPAN&gt;[Date]&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;, -1))"}&amp;gt;}[Date])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) May be the date format set through environmental variables are different then the date format for your field Date. So, it might help to add Date() function with the correct date format for Date field&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({$&amp;lt;[Date]={"$(=&lt;SPAN style="color: #ff0000;"&gt;Date(&lt;/SPAN&gt;AddYears(Max([Date]), -1)&lt;SPAN style="color: #ff0000;"&gt;, 'DD/MM/YYYY')&lt;/SPAN&gt;)"}&amp;gt;}[Date])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Are you making selections in other date and time related fields such as Year or Month, it might make sense to ignore selections in those fields as Date will be driving your selection here&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({$&amp;lt;[Date]={"$(=Date(AddYears(Max([Date]), -1), 'DD/MM/YYYY'))"}&lt;SPAN style="color: #ff0000;"&gt;, Year, Month, MonthYear, Quarter, QuarterYear&lt;/SPAN&gt;&amp;gt;}[Date])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 14:01:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319829#M834770</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-06T14:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319830#M834771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not getting an error, but all of my values are 0.&amp;nbsp; I can replace the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(=addyears([Date],-1)) section with a static date and it returns the result I would expect.&amp;nbsp; The .qvw file has sensitive data in it and I'm not sure how I could strip that out to share.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 14:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319830#M834771</guid>
      <dc:creator>rmooney-jvchc</dc:creator>
      <dc:date>2017-06-06T14:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319831#M834772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Date format is dd/mm/yyyy.&amp;nbsp; Not sure what the dual() means.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 14:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319831#M834772</guid>
      <dc:creator>rmooney-jvchc</dc:creator>
      <dc:date>2017-06-06T14:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319832#M834773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do have data, and as mentioned on my other reply, it returns the correct data when I enter a static date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 14:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319832#M834773</guid>
      <dc:creator>rmooney-jvchc</dc:creator>
      <dc:date>2017-06-06T14:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319833#M834774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I appreciate the suggestions, but none of those worked.&amp;nbsp; They still just returned zero values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 14:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319833#M834774</guid>
      <dc:creator>rmooney-jvchc</dc:creator>
      <dc:date>2017-06-06T14:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319834#M834775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample to show your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 15:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319834#M834775</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-06T15:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319835#M834776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is a sample of the document/data I'm working on.&amp;nbsp; It's the 4th column (2nd expression) I'm having problems with.&amp;nbsp; Looking at that sample data, here is what I'm needing the first row to look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date PY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count CY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count PY&lt;/P&gt;&lt;P&gt;6/6/2017&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/6/2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 103&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 15:33:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319835#M834776</guid>
      <dc:creator>rmooney-jvchc</dc:creator>
      <dc:date>2017-06-06T15:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Function within a Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319836#M834777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;‌ here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Count CY]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Book1.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AsOfTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date as AsOfDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 'CY' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate (AsOfTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date as AsOfDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(AddYears(Date, -1)) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 'PY' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165946_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 15:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-within-a-Set-Analysis/m-p/1319836#M834777</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-06T15:45:17Z</dc:date>
    </item>
  </channel>
</rss>

