<?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 - date filter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146323#M505466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here, I whipped up a quick sample. My formula doesn't seem to work with the named month. It seems like it should.&lt;/P&gt;&lt;P&gt;I added an INLINE load to link your month name (mese_chius) to a month num (mese_chius_num). Then I compared the month num to the MeseObj variable (which is also a number) and I think I used the original set analysis formula you set up. It works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2009 23:49:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-06-09T23:49:53Z</dc:date>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146319#M505462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a formula like this (where MonthOb is a variable out of a slider)&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Sum&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;month_chius&lt;/B&gt;=&lt;B&gt;MonthOb&lt;/B&gt;,&lt;B&gt;qta_ven&lt;/B&gt;)) &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Following my "learning curve" and lots of advice on topic, I thought to replace it with&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Sum&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;({$&amp;lt;&lt;B&gt;month_chius&lt;/B&gt;={&lt;B&gt;&lt;I&gt;$(#MonthOb)&lt;/I&gt;&lt;/B&gt;}&amp;gt;}&lt;B&gt;qta_ven&lt;/B&gt;) &lt;P&gt;It doesn't work because the $ replacement puts a NUMBER within brackets as a selection. Though the number content works with the if clause apparently it doesn't as a set parameter. If I replace the field with the literal "Feb" instead of "2" it does work.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;&lt;B&gt;month_chius&lt;/B&gt;={&lt;B&gt;&lt;I&gt;Feb&lt;/I&gt;&lt;/B&gt;}&amp;gt;}&lt;B&gt;qta_ven&lt;/B&gt;)&lt;/P&gt;&lt;P&gt;I also am trying some formulas to obtain the month without success but don't see why it should get so complicated if the field content is a number. Where is the mistake?&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 20:37:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146319#M505462</guid>
      <dc:creator>eiconsulting</dc:creator>
      <dc:date>2009-06-09T20:37:13Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146320#M505463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post a sample? This one may be a little easier if we could see what format your data is in.&lt;/P&gt;&lt;P&gt;From your description, it seems like you have stored the month as a string (e.g. 'Jan'). Is this the case? Do you have it anywhere where the month is stored as a number? I find it much easier to use numerical months as then you're not left wondering whether to use Jan, January, etc. If you don't have a numeric month (or a normal date) within your data, it may be worthwhile to add it in. Here's a recent discussion on going from month number to name, but the same ideas would apply: &lt;A href="http://community.qlik.com/forums/t/17054.aspx"&gt;http://community.qlik.com/forums/t/17054.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could try using something like: &lt;STRONG&gt;({$&amp;lt;month_chius&lt;/STRONG&gt;={&lt;I&gt;$(#=Date(MakeDate(1900, MonthOb), 'MMM'))&lt;/I&gt;}&amp;gt;}qta_ven)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 21:47:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146320#M505463</guid>
      <dc:creator />
      <dc:date>2009-06-09T21:47:56Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146321#M505464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried other times to post files without success. I would have anyway to make a simpler one as a sample.&lt;/P&gt;&lt;P&gt;Already looked at the post you linked. The *** thing is that the variable contains a number. I displayed it with a text box to make sure.&lt;/P&gt;&lt;P&gt;Obviously there is the usual SET in the script to provide IT month names:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;SET&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SET&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;MonthNames='Gen;Feb;Mar;Apr;Mag;Giu;Lug;Ago;Set;Ott;Nov;Dic'; DateFormat='DD/MM/YYYY';&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I tried with your formula adapted (replace text mese=month) if you place the expression in a text box the MMM (Feb) comes out. The same expr within the {} results in a 153 (days after 1900 - if you change the year the value increases) value that I detect using a blank label where the value is evaluated prior to using it in the table. Allow me to say that this would be a workaround. There is no reason why the if clause accepts a value and the SET should need the linked description. It is like in within {} the FORMAT is sterylized.&lt;/P&gt;&lt;P&gt;=Date(MakeDate(1900, MeseOb,1), 'MMM')&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Sum&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;({$&amp;lt;&lt;B&gt;mese_chius&lt;/B&gt;={&lt;B&gt;&lt;I&gt;$(#=Date(MakeDate(1900, MeseOb,1), 'MMM'))&lt;/I&gt;&lt;/B&gt;}&amp;gt;}&lt;B&gt;qta_ven&lt;/B&gt;) &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 23:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146321#M505464</guid>
      <dc:creator>eiconsulting</dc:creator>
      <dc:date>2009-06-09T23:11:14Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146322#M505465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I think you're stuck with the variable being a number. My suggestion was to use your Load script to load "mese_chius" in as a number too. Using the INLINE suggestion in that other post, you could link "mese_chius" to an INLINE table that would add a month number to your dataset.&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;mese_chius, mese_chius_num&lt;/P&gt;&lt;P&gt;Feb, 2 ....&lt;/P&gt;&lt;P&gt;That way you would have the month name and the month number as separate fields and could use whichever one suited the situation.&lt;/P&gt;&lt;P&gt;In order to attach a file, click the Options tab while composing your message and use the Add/Attach button. All you would need is a really simple sample. Just something that would use your field names and show what format your data is in. I don't have any sample data that stores a month name, so I don't have anything to test on. When doing Set Analysis, I usually end up doing guess and check a few times until I hit the correct formula.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 23:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146322#M505465</guid>
      <dc:creator />
      <dc:date>2009-06-09T23:37:34Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146323#M505466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here, I whipped up a quick sample. My formula doesn't seem to work with the named month. It seems like it should.&lt;/P&gt;&lt;P&gt;I added an INLINE load to link your month name (mese_chius) to a month num (mese_chius_num). Then I compared the month num to the MeseObj variable (which is also a number) and I think I used the original set analysis formula you set up. It works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 23:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146323#M505466</guid>
      <dc:creator />
      <dc:date>2009-06-09T23:49:53Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146324#M505467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(year(RefDate_Mov),2) &amp;amp; num(month(RefDate_Mov),00) &lt;B&gt;as&lt;/B&gt; PeriodoNum&lt;/P&gt;&lt;P&gt;so, its easier to manage dates.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 23:59:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146324#M505467</guid>
      <dc:creator />
      <dc:date>2009-06-09T23:59:22Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146325#M505468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Flavio wrote:&lt;B&gt;&lt;BR /&gt;It doesn't work because the $ replacement puts a NUMBER within brackets as a selection&lt;/B&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;The # in the variable expression forces a number. Have you tried it without the #?&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 09:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146325#M505468</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-06-10T09:53:24Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146326#M505469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS, Rob, &lt;STRONG&gt;YOU ARE RIGHT!!!!&lt;/STRONG&gt; I copied acritically a sample with the # ... without it the "turn-around solution" goes right and the formula WORKS and I can proceed. &lt;B&gt;Sum&lt;/B&gt; ({$&amp;lt;&lt;B&gt;mese_chius&lt;/B&gt;={&lt;B&gt;&lt;I&gt;$(=Date(MakeDate(1999, MeseOb,1), 'MMM'))&lt;/I&gt;&lt;/B&gt;}&amp;gt;}&lt;B&gt;qta_ven&lt;/B&gt;)&lt;/P&gt;&lt;P&gt;Just for the sake of pure KNOWLEDGE and to answer to other advice, we are speaking of a local variable attached to a slider. &lt;STRONG&gt;My initial question&lt;/STRONG&gt; was why would the IF clause work and the same field would not produce the same result within a SET instruction (that needs the "date conversion" function that was not working for the # sign)?&lt;/P&gt;&lt;P&gt;The (mese_chius = MeseOb) is evaluated differently from &amp;lt;&lt;B&gt;mese_chius&lt;/B&gt;={&lt;B&gt;&lt;I&gt;$(#MeseOb)&lt;/I&gt;&lt;/B&gt;}&amp;gt; With or without the #sign before MeseOb a number is substituted and it expects MMM text (?).&lt;/P&gt;&lt;P&gt;Managing the month number month text (MM MMM) with an INLINE structure is surely one way to avoid implicit conversion.&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2009 14:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146326#M505469</guid>
      <dc:creator>eiconsulting</dc:creator>
      <dc:date>2009-06-11T14:48:47Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146327#M505470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rob,&lt;/P&gt;&lt;P&gt;I have similar kind of issue. I am trying to get the report date which is the last month end date i.e. '09/30/2010'. I put this value in the variable throught the same table where all the Month end date present. please see the below code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;STRONG&gt;Script:&lt;BR /&gt;&lt;/STRONG&gt;&lt;I&gt;CardMast_Active:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;LOAD&lt;/B&gt; Report_NO, LoadDate_Active, LoadDay_Active, bal, AIF &lt;B&gt;FROM&lt;/B&gt; &lt;I&gt;[$(Outputpath)CardMast_Active.qvd]&lt;/I&gt; (qvd);&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;MinMaxDates:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;load&lt;BR /&gt;&lt;/B&gt; minstring(LoadDate_Active) &lt;B&gt;as&lt;/B&gt; StartDate,&lt;BR /&gt;maxstring(LoadDate_Active) &lt;B&gt;as&lt;/B&gt; ReportDate&lt;BR /&gt;&lt;B&gt;resident&lt;/B&gt; CardMast_Active&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;// now get the values...&lt;BR /&gt;&lt;/B&gt; let ReportDate = peek('ReportDate',0) ;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Expression:&lt;/STRONG&gt;&lt;BR /&gt;=COUNT({$&amp;lt;AIF = {'P'}, LoadDate_Active = {$(=Date($(#=ReportDate),'MM/DD/YYYY'))} &amp;gt;} AIF)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The above expression is not working.. &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt; please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Oct 2010 15:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146327#M505470</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2010-10-25T15:16:59Z</dc:date>
    </item>
    <item>
      <title>SET Analysis - date filter</title>
      <link>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146328#M505471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the answer in other discussion thanks guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LoadDate_Active = {"$(=Date($(#=ReportDate),'MM/DD/YYYY'))"} &amp;gt;} AIF)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Oct 2010 15:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-Analysis-date-filter/m-p/146328#M505471</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2010-10-25T15:45:17Z</dc:date>
    </item>
  </channel>
</rss>

