<?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_expression in a variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488085#M182379</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;Yes, normally you can put any part of expression in a variable.&lt;/P&gt;&lt;P&gt;For example you can put 'Year={2014}, MonthNum={3}' in vBaseSet&lt;/P&gt;&lt;P&gt;And then use in expression: Sum({&amp;lt;$(vBaseSet)&amp;gt;} Value) or&amp;nbsp; Sum({&amp;lt;$(vBaseSet), Day={1}&amp;gt;} Value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if the speller fails it doesn't mean that expression is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The drawback is that later to understand the expression you have to know the variable value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, sooner or later you will have problems with quotes like Dim={'Value'}, sometimes it fails with no reason. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can even try $-sign expressions with parameters...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jan 2014 18:22:08 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2014-01-09T18:22:08Z</dc:date>
    <item>
      <title>Set_expression in a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488083#M182377</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;just a quick question: When I have a set_expression that I would normally have to copy-paste into all my formulas, approx. 100x in total, can I put that in a variable instead?&lt;/P&gt;&lt;P&gt;How would that have to look?&lt;/P&gt;&lt;P&gt;Can I use it using the $-sign expansion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 10:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488083#M182377</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-01-09T10:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set_expression in a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488084#M182378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can put the expression in a variable and yes you need to dollar-expand it where you use the variable.&lt;/P&gt;&lt;P&gt;variable vSum: sum({&amp;lt;Year={2014}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;expression using the variable: $(vSum)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 10:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488084#M182378</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-01-09T10:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set_expression in a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488085#M182379</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;Yes, normally you can put any part of expression in a variable.&lt;/P&gt;&lt;P&gt;For example you can put 'Year={2014}, MonthNum={3}' in vBaseSet&lt;/P&gt;&lt;P&gt;And then use in expression: Sum({&amp;lt;$(vBaseSet)&amp;gt;} Value) or&amp;nbsp; Sum({&amp;lt;$(vBaseSet), Day={1}&amp;gt;} Value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if the speller fails it doesn't mean that expression is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The drawback is that later to understand the expression you have to know the variable value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, sooner or later you will have problems with quotes like Dim={'Value'}, sometimes it fails with no reason. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can even try $-sign expressions with parameters...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 18:22:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-in-a-variable/m-p/488085#M182379</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-01-09T18:22:08Z</dc:date>
    </item>
  </channel>
</rss>

