<?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: Set Analysis with Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749595#M267430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Num(sum({$&amp;lt;TNA_DATE={'$(vDateMax)'},CONSULTANT_FIRM_ID={*}&amp;gt;} ASSET_ACCOUNT_TNA),'$ #,##0')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 17:13:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-07T17:13:13Z</dc:date>
    <item>
      <title>Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749591#M267426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a variable vDateMax = num(max(TNA_DATE)) to return the max date of date range selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like a text object to display the sum of ASSETS where TNA_DATE=vDateMax. This is my expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Num(sum({$&amp;lt;TNA_DATE={$(vDateMax)},CONSULTANT_FIRM_ID={*}&amp;gt;} ASSET_ACCOUNT_TNA),'$ #,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help; I'm getting "Error in set modifier ad hoc element list: ',' or ')' expected"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749591#M267426</guid>
      <dc:creator />
      <dc:date>2015-01-07T16:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749592#M267427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try to put the $(vDateMax) in quotes like this $("vDateMax") &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 17:08:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749592#M267427</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-01-07T17:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749593#M267428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try putting single quotes around the variable name?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 17:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749593#M267428</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2015-01-07T17:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749594#M267429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and the vDateMax might have to be also quoted ... since I dont know which context have it set....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is from the Load Script:&amp;nbsp;&amp;nbsp; SET vDateMax = Max(TNA_DATE);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TNA_DATE is it a purely Numeric field or is it a Date/DateTime field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 17:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749594#M267429</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-01-07T17:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749595#M267430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Num(sum({$&amp;lt;TNA_DATE={'$(vDateMax)'},CONSULTANT_FIRM_ID={*}&amp;gt;} ASSET_ACCOUNT_TNA),'$ #,##0')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 17:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749595#M267430</guid>
      <dc:creator />
      <dc:date>2015-01-07T17:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749596#M267431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;would you need to do TNA_DATE = {"$(=vDateMax)"} ? Just adding that equal sign. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749596#M267431</guid>
      <dc:creator>cspencer3</dc:creator>
      <dc:date>2015-01-07T19:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749597#M267432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all. Adding the quotations solves the error; however, the calculation is still not right. I believe I need to change the variable definition to include the condition (where CONSULTANT_ID exists). Can someone advise on syntax?&lt;BR /&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vDateMax = num(max(TNA_DATE))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:21:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749597#M267432</guid>
      <dc:creator />
      <dc:date>2015-01-07T19:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749598#M267433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the value you are comparing in the set expression is a number then you will not need to use quotes&amp;nbsp; around the variable&amp;nbsp;&amp;nbsp; e.g. TNA_DATE={$(vDateMax)}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the value in TNA_DATE is text, then the variable must be enclosed in single quotes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TNA_DATE={'$(vDateMax)'}&lt;/P&gt;&lt;P&gt;Dates further complicate this as the date formats must match as well, so you may need to use something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TNA_DATE={ "$(= date($(vDateMax), 'DD/MM/YYYY')" }&lt;/P&gt;&lt;P&gt;replacing DD//MM/YYYY with your actual date format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749598#M267433</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-07T19:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749599#M267434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestion, Colin. Now I get "Error in set modifier expression" though&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Num(sum({$&amp;lt;Date(TNA_DATE,'MM/DD/YYYY')={$(vDateMax)},CONSULTANT_FIRM_ID={*}&amp;gt;} ASSET_ACCOUNT_TNA),'$ #,##0')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749599#M267434</guid>
      <dc:creator />
      <dc:date>2015-01-07T19:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749600#M267435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find this site extremely helpful when using variables in Set Analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikblog.at/1384/set-analysis-wizard-qlikview/"&gt;http://www.qlikblog.at/1384/set-analysis-wizard-qlikview/&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 21:21:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749600#M267435</guid>
      <dc:creator>cbaqir</dc:creator>
      <dc:date>2015-01-07T21:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749601#M267436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Try this, you need to format the variable not the field being compared.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;=Num(sum({$ &amp;lt;TNA_DATE={" $(= date($(vDateMax),'MM/DD/YYYY,)"}, CONSULTANT_FIRM_ID= &amp;gt;} ASSET_ACCOUNT_TNA),'$ #,##0')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 21:42:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749601#M267436</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-07T21:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749602#M267437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out finally. Gave up on using the on-the-fly variable (vDateMax), and used the existing column TNA_DATE instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(Sum({$&amp;lt;CONSULTANT_FIRM_ID={*},TNA_DATE={$(=max(TNA_DATE))}&amp;gt;}ASSET_ACCOUNT_TNA),'$ #,##0')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 03:04:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749602#M267437</guid>
      <dc:creator />
      <dc:date>2015-01-08T03:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749603#M267438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you - i already use this site all the time &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 03:05:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable/m-p/749603#M267438</guid>
      <dc:creator />
      <dc:date>2015-01-08T03:05:10Z</dc:date>
    </item>
  </channel>
</rss>

