<?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: Expression Query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772931#M274222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dermot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) You could use (easier perhaps) the DATE() function to get the year-month&lt;/P&gt;&lt;P&gt;(like &amp;gt;&amp;gt; DATE([date_field], 'MMM-YY') &amp;lt;&amp;lt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) In the set_expression, I think it has to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BUD_MONTH_YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={"$(vCurrMonthYear)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BudgetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Alternatively, I think you could also calculate that variable right there, in the set_expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 14:51:33 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2015-01-27T14:51:33Z</dc:date>
    <item>
      <title>Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772929#M274220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table that has a monthly target in it using Mmm-YYYY for each month, ie Jan-2015, Feb-2015 etc.&amp;nbsp; I then have a variable that sets the current month, vCurrentMonth, its set using :&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) &amp;amp; '-' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and gives the value Jan-2015 for today.&amp;nbsp; I then want this months budget to equal the Jan figure from the table and am using the following expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BUD_MONTH_YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=($(vCurrMonthYear)))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BudgetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But its not working, anyone any ideas?&amp;nbsp; Thanks.&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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772929#M274220</guid>
      <dc:creator>dmac1971</dc:creator>
      <dc:date>2015-01-27T14:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772930#M274221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within the Master Calendar are you using the same method to calculate the Month Year? i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;Load TempDate as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) &amp;amp; '-' &amp;amp; Year(TempDate) as BUD_MONTH_YEAR&lt;/P&gt;&lt;P&gt;Resident YourTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using another method to calculate BUD_MONTH_YEAR in the script, then I would use the same method to calculate the vCurrMonthYear variable using the same functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:50:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772930#M274221</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-01-27T14:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772931#M274222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dermot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) You could use (easier perhaps) the DATE() function to get the year-month&lt;/P&gt;&lt;P&gt;(like &amp;gt;&amp;gt; DATE([date_field], 'MMM-YY') &amp;lt;&amp;lt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) In the set_expression, I think it has to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BUD_MONTH_YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={"$(vCurrMonthYear)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BudgetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Alternatively, I think you could also calculate that variable right there, in the set_expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772931#M274222</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-01-27T14:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772932#M274223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the correct syntax is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=Sum({&amp;lt;BUD_MONTH_YEAR={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrMonthYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} BudgetValue) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;let me know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772932#M274223</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-01-27T14:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772933#M274224</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;Why not if you use individual filter selection for Year and Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year ={'$(=Year(Today()))'}, Month={'$(=Month(Today()))'}&amp;gt;} BudgetValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772933#M274224</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-01-27T14:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772934#M274225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have found this to work :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BUD_MONTH_YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(vCurrMonthYear)'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BudgetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772934#M274225</guid>
      <dc:creator>dmac1971</dc:creator>
      <dc:date>2015-01-27T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Query</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772935#M274226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Dermot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way is to change the variable to pure date format it seems you are using string dates as month year field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vCurrMonthYear = MonthName(MakeDate(Year(Today()), Month(Today())))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in the Expression use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Monthname={"$(vCurrMonthYear)"}&amp;gt;} BudgetValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:-&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="76379" alt="Op222.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/76379_Op222.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 15:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Query/m-p/772935#M274226</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-01-27T15:03:21Z</dc:date>
    </item>
  </channel>
</rss>

