<?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: Help with set analysis &amp;quot;Date range&amp;quot; in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524553#M195994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks to Jagan and Rajkumar. I make some changes to my formula.&lt;/P&gt;&lt;P&gt;I found that my default format for [Sales Date] is DD/MM/YYYY so I changed the Date function to match this format:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the total number of sales within date range: =Count({1&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Sales Date] = {"&amp;gt;=$(=Date(vFromDate, 'DD/MM/YYYY'))&amp;lt;=$(=Date(vToDate, 'DD/MM/YYYY'))"}&amp;gt;} DISTINCT [Sales ID])&lt;/LI&gt;&lt;LI&gt;For the total of sales selected customer participate: =Count({$&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Run Date] = {"&amp;gt;=$(=Date(vFromDate, 'DD/MM/YYYY'))&amp;lt;=$(=Date(vToDate, 'DD/MM/YYYY'))"} &amp;gt;} DISTINCT [Sales ID])&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Oct 2013 06:53:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-25T06:53:35Z</dc:date>
    <item>
      <title>Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524546#M195987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to create a report to show the different between the "total number of Sales" and "total number of sales the customer participate".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Format is :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the total number of sales within date range: =Count({1&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Sales Date] = {"&amp;gt;=$(=Date($(vFromDate)))&amp;lt;=$(=Date($(vToDate)))"}&amp;gt;} DISTINCT [Sales ID])&lt;/LI&gt;&lt;LI&gt;For the total of sales selected customer participate: =Count({$&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Run Date] = {"&amp;gt;=$(=Date($(vFromDate)))&amp;lt;=$(=Date($(vToDate)))"} &amp;gt;} DISTINCT [Sales ID])&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but both of them are not working.... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;Can someone help me on this??? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 05:07:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524546#M195987</guid>
      <dc:creator />
      <dc:date>2013-10-25T05:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524547#M195988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For showing total sales irrespective of customer try this expression&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Sales Date] = {"&amp;gt;=$(=Date($(vFromDate)))&amp;lt;=$(=Date($(vToDate)))"},&lt;STRONG&gt;Customer=&lt;/STRONG&gt;&amp;gt;} DISTINCT [Sales ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or Post your sample file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 05:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524547#M195988</guid>
      <dc:creator />
      <dc:date>2013-10-25T05:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524548#M195989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use Count({1}. So all the selections will be ignore.&lt;/P&gt;&lt;P&gt;The problem should be caused by the Date range. I remove the date range part it is working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 05:21:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524548#M195989</guid>
      <dc:creator />
      <dc:date>2013-10-25T05:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524549#M195990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use &lt;STRONG&gt;numeric date&lt;/STRONG&gt;. Set analysis does not handle well date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a "Sales_date_num" in your script (by multiplying your "Sales Date" by 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Sales Date] * 1 as Sales_date_num&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be sure your variable use also numeric format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 05:38:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524549#M195990</guid>
      <dc:creator>vivientexier</dc:creator>
      <dc:date>2013-10-25T05:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524550#M195991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this expression&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Sales Date] = {"&amp;gt;=$(=Date(vFromDate))&amp;lt;=$(=Date(vToDate))"}&amp;gt;} DISTINCT [Sales ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not working then check whether the format of dates are same, if not convert to the same format by using Date(date, formatspecifier).&lt;/P&gt;&lt;P&gt;check [Sales Date] and =Date((vFromDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 05:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524550#M195991</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-10-25T05:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524551#M195992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If date formats of [Sales Date], vFromDate and&amp;nbsp; vToDate are same (e.g."03/01/2011 13:12") &lt;/P&gt;&lt;P&gt;Then use date range {"&amp;gt;=$(=vFromDate)&amp;lt;=$(=vToDate)"}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If date formats of [Sales Date],vFromDate and vToDate are not same (e.g."vToDate &amp;amp;vFromDate are like =03/01/2011 13:12" and [Sales Date] like "03/01/2011') &lt;/P&gt;&lt;P&gt;Then use date range {"&amp;gt;=$(=Date(vFromDate))&amp;lt;=$(=Date(vToDate))"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or let me know your Date format then I can provide you proper code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 06:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524551#M195992</guid>
      <dc:creator />
      <dc:date>2013-10-25T06:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524552#M195993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. You are right, Set analysis does not handle well the date format. But for my case, change of the load script is not a very good idea. I have far too many tables and other reports......&lt;/P&gt;&lt;P&gt;But this is still a good idea. Maybe I can try this next time~~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 06:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524552#M195993</guid>
      <dc:creator />
      <dc:date>2013-10-25T06:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with set analysis "Date range"</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524553#M195994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks to Jagan and Rajkumar. I make some changes to my formula.&lt;/P&gt;&lt;P&gt;I found that my default format for [Sales Date] is DD/MM/YYYY so I changed the Date function to match this format:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the total number of sales within date range: =Count({1&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Sales Date] = {"&amp;gt;=$(=Date(vFromDate, 'DD/MM/YYYY'))&amp;lt;=$(=Date(vToDate, 'DD/MM/YYYY'))"}&amp;gt;} DISTINCT [Sales ID])&lt;/LI&gt;&lt;LI&gt;For the total of sales selected customer participate: =Count({$&amp;lt;[Status ID]= {3,4}, [Type ID] = {1}, [Run Date] = {"&amp;gt;=$(=Date(vFromDate, 'DD/MM/YYYY'))&amp;lt;=$(=Date(vToDate, 'DD/MM/YYYY'))"} &amp;gt;} DISTINCT [Sales ID])&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 06:53:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis-quot-Date-range-quot/m-p/524553#M195994</guid>
      <dc:creator />
      <dc:date>2013-10-25T06:53:35Z</dc:date>
    </item>
  </channel>
</rss>

