<?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 variables in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1600990#M444272</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I face some issue on while using set analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have loaded the data&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;DateSK,&lt;BR /&gt;Date(Date#(DateSK,'YYYYMMDD'),'MM/DD/YYYY') as ActiveDate,&amp;nbsp;&lt;BR /&gt;LOMAddsSK,&lt;BR /&gt;CountriesSK,&lt;BR /&gt;CustomerTypeSK,&lt;BR /&gt;GenderSK,&lt;BR /&gt;LanguageSK,&lt;BR /&gt;RankSK,&lt;BR /&gt;ItemCateogrySK,&lt;BR /&gt;CustomerCategorySK,&lt;BR /&gt;AgeGroupSK,&lt;BR /&gt;LOMSignupSK,&lt;BR /&gt;If(Paid = 'Yes', 1, 0) as [Active Paid],&lt;BR /&gt;CustomerStatusSK&lt;BR /&gt;//IsTestCustomer&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Users\smamo\Documents\QlikViewDB\QVDs\DemographicDashboardQVDs\FactDailyActiveCustomers.qvd]&lt;BR /&gt;(qvd)&lt;BR /&gt;Where Year(Date(Date#(DateSK,'YYYYMMDD'),'MM/DD/YYYY')) &amp;gt;= Year(Today())-1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I put the maximum value in a variable&lt;/P&gt;&lt;P&gt;LET vMaxActiveDate = 'Max(ActiveDate)';&lt;/P&gt;&lt;P&gt;Then when I used it in set analysis as a filtering condition&lt;/P&gt;&lt;P&gt;=num(sum({&amp;lt;ActiveDate={'$(vMaxActiveDate)'}&amp;gt;}ActiveCount), '#,##0')&lt;/P&gt;&lt;P&gt;It results 0 but when I put a hard coded date instead of the variable it displays like&lt;/P&gt;&lt;P&gt;=num(sum( {&amp;lt; ActiveDate={"06/30/2019"}&amp;gt;}ActiveCount), '#,##0')&lt;/P&gt;&lt;P&gt;It gives me a result&lt;/P&gt;&lt;P&gt;I also checked my variable value in another check box by giving a value = $(vMaxActiveDate) and it gives me the maximum date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me what did I do wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2019 15:12:15 GMT</pubDate>
    <dc:creator>sirkyQ</dc:creator>
    <dc:date>2019-07-10T15:12:15Z</dc:date>
    <item>
      <title>variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1600990#M444272</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I face some issue on while using set analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have loaded the data&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;DateSK,&lt;BR /&gt;Date(Date#(DateSK,'YYYYMMDD'),'MM/DD/YYYY') as ActiveDate,&amp;nbsp;&lt;BR /&gt;LOMAddsSK,&lt;BR /&gt;CountriesSK,&lt;BR /&gt;CustomerTypeSK,&lt;BR /&gt;GenderSK,&lt;BR /&gt;LanguageSK,&lt;BR /&gt;RankSK,&lt;BR /&gt;ItemCateogrySK,&lt;BR /&gt;CustomerCategorySK,&lt;BR /&gt;AgeGroupSK,&lt;BR /&gt;LOMSignupSK,&lt;BR /&gt;If(Paid = 'Yes', 1, 0) as [Active Paid],&lt;BR /&gt;CustomerStatusSK&lt;BR /&gt;//IsTestCustomer&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Users\smamo\Documents\QlikViewDB\QVDs\DemographicDashboardQVDs\FactDailyActiveCustomers.qvd]&lt;BR /&gt;(qvd)&lt;BR /&gt;Where Year(Date(Date#(DateSK,'YYYYMMDD'),'MM/DD/YYYY')) &amp;gt;= Year(Today())-1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I put the maximum value in a variable&lt;/P&gt;&lt;P&gt;LET vMaxActiveDate = 'Max(ActiveDate)';&lt;/P&gt;&lt;P&gt;Then when I used it in set analysis as a filtering condition&lt;/P&gt;&lt;P&gt;=num(sum({&amp;lt;ActiveDate={'$(vMaxActiveDate)'}&amp;gt;}ActiveCount), '#,##0')&lt;/P&gt;&lt;P&gt;It results 0 but when I put a hard coded date instead of the variable it displays like&lt;/P&gt;&lt;P&gt;=num(sum( {&amp;lt; ActiveDate={"06/30/2019"}&amp;gt;}ActiveCount), '#,##0')&lt;/P&gt;&lt;P&gt;It gives me a result&lt;/P&gt;&lt;P&gt;I also checked my variable value in another check box by giving a value = $(vMaxActiveDate) and it gives me the maximum date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me what did I do wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 15:12:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1600990#M444272</guid>
      <dc:creator>sirkyQ</dc:creator>
      <dc:date>2019-07-10T15:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1600997#M444275</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vMaxActiveDate = '=Max(ActiveDate)';&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Jul 2019 15:31:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1600997#M444275</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-07-10T15:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1608498#M444922</link>
      <description>&lt;P&gt;Did Frank's post resolve the issue?&amp;nbsp; If so, please give him credit by clicking the Accept as Solution button on his post, and if it did not help, either provide further information, or let everyone know what you did to fix things, and after you post that, you can mark that as the solution as well.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 12:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variables-in-set-analysis/m-p/1608498#M444922</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-08-01T12:25:05Z</dc:date>
    </item>
  </channel>
</rss>

