<?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 Variable Issue in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179182#M46121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what does mean with single quotes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Date={'$(=vTodayDate)'}&amp;gt;} Sales)&lt;/STRONG&gt; --&amp;gt; it didn't work.... I can't understand why...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am doing:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;FinYear={$(=Max(FinYear))} &amp;gt;}(Sales)) --&amp;gt; it's working .. but it shows me just the actual year...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I tried:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt; FinMonth={$(=Max(FinMonth))},FinYear={$(=Max(FinYear))}&amp;gt;}(Sales)) --&amp;gt; Working also ....&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;then I tried:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt; FinDay={$(=Max(FinDay))},FinMonth={$(=Max(FinMonth))},FinYear={$(=Max(FinYear))}&amp;gt;}(Sales)) --&amp;gt; it's not working, I dont know why??? &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Aug 2011 06:28:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-04T06:28:00Z</dc:date>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179175#M46114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;BR /&gt;&lt;BR /&gt;I am very new to QlikView and I am trying to work out how to use a variable in a set analysis expression.&lt;BR /&gt;&lt;BR /&gt;I have tried doing it, but it is not giving me the right results. I believe I might be doing something wrong when I reference the variable in the set analysis.&lt;BR /&gt;&lt;BR /&gt;Please can someone kindly help me write out a simple set analysis expression using one variable and two fields.&lt;BR /&gt;&lt;BR /&gt;Let's assume the variable is called vLastMonth and the field name is called CurrentDate.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 21:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179175#M46114</guid>
      <dc:creator />
      <dc:date>2011-01-20T21:19:31Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179176#M46115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, if you work with month, you need to create a Month field&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;= Month(CurrentDate)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;. And your expression could be: &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({$ &amp;lt;Month={$(=vLastMonth )}&amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Or if you need a range of dates for last month, it could be:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sum({$ &amp;lt;CurrentDate={"$(='&amp;gt;=' &amp;amp; Date('1/$(=vLastMonth)/2011' , 'D/M/YYYY') &amp;amp; '&amp;lt;' &amp;amp; AddMonths(Date('1/$(=vLastMonth)/2011' , 'D/M/YYYY') , 1))"}&amp;gt;} Sales)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 21:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179176#M46115</guid>
      <dc:creator />
      <dc:date>2011-01-20T21:39:52Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179177#M46116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nick,&lt;/P&gt;&lt;P&gt;Can you please add another "pretend" field called Region and set it to say Manchester in the first set analysis expression that you used.&lt;/P&gt;&lt;P&gt;That would be very useful to me and could potentially solve my problem.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 22:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179177#M46116</guid>
      <dc:creator />
      <dc:date>2011-01-20T22:08:54Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179178#M46117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum({&amp;lt;Region={'Manchester'},Month={$(=vLastMonth)}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;There are a number of examples if you look for Set Analysis in the help file index. Not sure they do much with dollar sign expansion or variables, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 00:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179178#M46117</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-21T00:15:12Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179179#M46118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 00:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179179#M46118</guid>
      <dc:creator />
      <dc:date>2011-01-21T00:23:14Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179180#M46119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same Problem and I am lost .... Please help me!!!&amp;nbsp; I did what John wrote, but it didn't work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a piechart! dimension is: product, and my formula for sale is: sum({&amp;lt;Date={$(=vTodayDate)}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it dosen't show the pie in my diagramm &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I write: sum({&amp;lt;Date={$('30.06.2009')}&amp;gt;} Sales) --&amp;gt; its working.. but then I can't select other year to show the sale to other years!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my Script, I wrote: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vTodayDate = num(MakeDate(2009,06,30));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(OrderDate) as Date, etc.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please HELP ME.....&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 15:06:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179180#M46119</guid>
      <dc:creator />
      <dc:date>2011-08-03T15:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179181#M46120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you just need single quotes around the date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Date={'$(=vTodayDate)'}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 20:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179181#M46120</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-03T20:34:24Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179182#M46121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what does mean with single quotes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Date={'$(=vTodayDate)'}&amp;gt;} Sales)&lt;/STRONG&gt; --&amp;gt; it didn't work.... I can't understand why...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am doing:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;FinYear={$(=Max(FinYear))} &amp;gt;}(Sales)) --&amp;gt; it's working .. but it shows me just the actual year...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I tried:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt; FinMonth={$(=Max(FinMonth))},FinYear={$(=Max(FinYear))}&amp;gt;}(Sales)) --&amp;gt; Working also ....&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;then I tried:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt; FinDay={$(=Max(FinDay))},FinMonth={$(=Max(FinMonth))},FinYear={$(=Max(FinYear))}&amp;gt;}(Sales)) --&amp;gt; it's not working, I dont know why??? &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 06:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179182#M46121</guid>
      <dc:creator />
      <dc:date>2011-08-04T06:28:00Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179183#M46122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hei &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if vTodayDate is a varaible &lt;/P&gt;&lt;P&gt;then chcek that the result is in the same format as the Date field &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i use varaible i write in the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Date={"$(#vTodayDate)"}&amp;gt;} Sales)&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the formula in the varaible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 06:39:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179183#M46122</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-08-04T06:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179184#M46123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should not have to use the equal sign when you expand a variable. Assuming the variable is just a plain date, then you should be able to just expand it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;sum({&amp;lt;Date={'$(vTodayDate)'}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;STRONG style="font-size: 12px;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The quoting in general is required to make the quoted value a text string. Maybe the key to success would be to quote the FinDay part? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum( { $&amp;lt; FinDay = { '$(=Max(FinDay))' } &amp;gt; }(Sales))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 06:42:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179184#M46123</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-08-04T06:42:35Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179185#M46124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that is my varialbe:&lt;/P&gt;&lt;P&gt;LET vTodayDate = num(MakeDate(2009,06,30));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my Date is:&lt;/P&gt;&lt;P&gt;Date(OrderDate) as Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is for FinDay:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is the code for my Calendar:&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;/P&gt;&lt;P&gt; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FinYear &amp;amp; '-' &amp;amp; Quarter as FinYearQtr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FinMonth &amp;amp;'-'&amp;amp;FinYear as FinMonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Year &amp;amp; '-' &amp;amp; Quarter as YearQtr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(FinYear = $(vCurrentYear), 1, 0) as CY_Flag,// Current Year Flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(FinYear = $(vLastYear), 1, 0) as LY_Flag&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Last Year Flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/P&gt;&lt;P&gt; LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OrderDate,// is from the Database&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Year(OrderDate) as Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Month(OrderDate) as Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Week(OrderDate) as Week,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Day(OrderDate) as Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Date(OrderDate) as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Q' &amp;amp; Ceil(Month(OrderDate)/3) as Quarter, // Calendar-Quarter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Q' &amp;amp; Ceil(Month(addmonths(OrderDate,-6))/3) as FinQuarter, // Fiscal-Quarter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Date(Monthstart(OrderDate),'MMM-YYYY') as YearMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(num(month(OrderDate)) &amp;lt;= 6, month(OrderDate) + 6, month(OrderDate)-6) as FinMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(num(month(OrderDate)) &amp;lt;= 6, Year(OrderDate) , Year(OrderDate)+1) as FinYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(num(month(OrderDate)) &amp;lt;= 6, Day(OrderDate) , Day(OrderDate)) as FinDay&lt;/P&gt;&lt;P&gt;RESIDENT SalesOrder;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a new User in QlikView... Sorry, that I can't understand everything what u meant...&amp;nbsp; Therefore I pasted some codes, what I did....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with the formula what u posted.. nothing worked.... by the way thx for helping me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179185#M46124</guid>
      <dc:creator />
      <dc:date>2011-08-04T07:12:59Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179186#M46125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; accroding to your script&lt;/P&gt;&lt;P&gt;your expression sholud be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Date={"$(=date(vTodayDate))"}&amp;gt;} Sales)&lt;/STRONG&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179186#M46125</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-08-04T07:17:31Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179187#M46126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so MUCH!!!! It is working now... Thanks a lot!!! I am so happy now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I have one more question: now it's showing me of the date 30.06.2009, but when I am selecting another year for example, then it wont be calculating for other dates... &lt;BR /&gt;I know why, but how can I do that it will also calculating for other years, month, and dates???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179187#M46126</guid>
      <dc:creator />
      <dc:date>2011-08-04T07:28:11Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179188#M46127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hei&lt;/P&gt;&lt;P&gt;for what Date do you want it to calculte&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let say you want it for the maxium date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the the varaible vTodayDate should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=max(Date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179188#M46127</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-08-04T07:35:53Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179189#M46128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay then I will try with max(Date), that means if I am using the max() then I can also selecting other dates and it will calculating?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179189#M46128</guid>
      <dc:creator />
      <dc:date>2011-08-04T07:42:40Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179190#M46129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hei jenni&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you explain what you want to achive in the expression&lt;/P&gt;&lt;P&gt;that way i can help you better&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 08:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179190#M46129</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-08-04T08:03:32Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179191#M46130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry for my bad explaination... Enlish is not my native language .... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want in my forumula: if there is no selection, then show me of the date 30.06.2009 (that one is my current Date in my application)&lt;/P&gt;&lt;P&gt;But when the user will selecting the year or month or day or another Date for example :22.05.2007, then it should also show of this date.&lt;/P&gt;&lt;P&gt;Without selecting it should&amp;nbsp; show of the 30.06.2009. but the user can also selecting other dates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;FinMonth={$(=Max(FinMonth))},FinYear={$(=Max(FinYear))},FinDay={$(vCurrentDay)}&amp;gt;}(Sales)) &lt;BR /&gt;&lt;SPAN lang="EN-US" style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;it’s working, but I can selecting just the year, and the month, but If I am selecting a Date (22.05.2007) or a Day then it wont be calculating.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thank you so much for ur helping, I was yesterday really lost!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 08:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179191#M46130</guid>
      <dc:creator />
      <dc:date>2011-08-04T08:29:19Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179192#M46131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With this formula: &lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;={'$(=Max(Date))'} &amp;gt; }(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; I can just selection in the Field “Date”&lt;BR /&gt;On my app, I have more Fields: Year, Month, Quarter, Day, and Date&lt;BR /&gt;And&amp;nbsp; I want that I can selecting all of them, Do you understand what I mean? without selecting, it should show me the date of 30.06.2009 because that date is my current date...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 08:58:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179192#M46131</guid>
      <dc:creator />
      <dc:date>2011-08-04T08:58:13Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179193#M46132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo me again, what you mean with the :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the the varaible vTodayDate should be&lt;/P&gt;&lt;P&gt;=max(Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried everything, but it still not working correct &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 12:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179193#M46132</guid>
      <dc:creator />
      <dc:date>2011-08-04T12:57:22Z</dc:date>
    </item>
    <item>
      <title>Variable Issue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179194#M46133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;@Jenni&lt;/STRONG&gt;; One reflection after looking at the previous code and the solution. I do not really see why you set the variable to date and then convert it to a number, if you then use it later on to compare with another Date. To me it would be better to avoid converting data and work with the dates in the Date format straight away. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider that Date is a dual data type where there is a textual part that presents the readable content (eg 2011-05-28) and the underlaying numeric value is the number of days from 31/12/1899. If you set a variable to be a Date, then you can use this directly in calculations. Date - 23 would for example change the Date value 23 days back in time. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 13:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Issue-in-Set-Analysis/m-p/179194#M46133</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-08-04T13:39:36Z</dc:date>
    </item>
  </channel>
</rss>

