<?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 Using Date in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308207#M113805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you need to change the script to:&lt;/P&gt;&lt;P&gt;Date(monthstart(CloseDate), 'MMYYYY') as CloseDate_MY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or the set analysis to sum({ $&amp;lt;CloseDate_MY={05-2011}&amp;gt;} Opportunity.Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can break the date in two fields: &lt;/P&gt;&lt;P&gt;year(CloseDate) as CloseYear,&lt;/P&gt;&lt;P&gt;num(month(CloseDate)) as CloseNMonth&lt;/P&gt;&lt;P&gt;and set analysis to: &lt;/P&gt;&lt;P&gt;sum({ $&amp;lt;ClsoeYear={2011}, CloseNMonth={5}&amp;gt;} Opportunity.Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2011 13:22:41 GMT</pubDate>
    <dc:creator>erichshiino</dc:creator>
    <dc:date>2011-05-18T13:22:41Z</dc:date>
    <item>
      <title>Using Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308206#M113804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use a set analysis as an expression where I need to limit the select to a specific month. I cant seem to get the date syntax correct.&lt;/P&gt;&lt;P&gt;I used the below script to change the desired date from dd/mm/yyyy to MM-YYYY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(monthstart(CloseDate), 'MM-YYYY') as CloseDate_MY;&lt;/P&gt;&lt;P&gt;This part works fine.....but now that the date is in that format...how do you write the desired month in the set analysis expression. My expression is below:&lt;/P&gt;&lt;P&gt;sum({ $&amp;lt;CloseDate_MY={052011}&amp;gt;} Opportunity.Amount) ( I need to limit the date to May 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 13:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308206#M113804</guid>
      <dc:creator />
      <dc:date>2011-05-18T13:14:44Z</dc:date>
    </item>
    <item>
      <title>Using Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308207#M113805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you need to change the script to:&lt;/P&gt;&lt;P&gt;Date(monthstart(CloseDate), 'MMYYYY') as CloseDate_MY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or the set analysis to sum({ $&amp;lt;CloseDate_MY={05-2011}&amp;gt;} Opportunity.Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can break the date in two fields: &lt;/P&gt;&lt;P&gt;year(CloseDate) as CloseYear,&lt;/P&gt;&lt;P&gt;num(month(CloseDate)) as CloseNMonth&lt;/P&gt;&lt;P&gt;and set analysis to: &lt;/P&gt;&lt;P&gt;sum({ $&amp;lt;ClsoeYear={2011}, CloseNMonth={5}&amp;gt;} Opportunity.Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 13:22:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308207#M113805</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-18T13:22:41Z</dc:date>
    </item>
    <item>
      <title>Using Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308208#M113806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would advice to create a Flag in the script named "ClosedDtFlag" and marked it against the Date/Month/Year with value as 1or 0 and in expression you can simply write as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal Expression:-&lt;/P&gt;&lt;P&gt;SUM(﻿﻿﻿Opportunity.Amount*ClosedDTFlag) or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;ClosedDTFlag={1}&amp;gt; Opportunity.Amount})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 14:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Date-in-Set-Analysis/m-p/308208#M113806</guid>
      <dc:creator />
      <dc:date>2011-05-18T14:32:49Z</dc:date>
    </item>
  </channel>
</rss>

