<?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 Expressions in Variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182923#M48364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Rob.....didn't know I had to do that. This was my first post on this site. I have now "Verified". Thanks again for the help.&lt;/P&gt;&lt;P&gt;I was thinking that I would load these variables in my load script.....that way I would have a good spot to maintain them. When I try to assign these variables in the load script, I receive an error......specifically in those formulas with the Aggr function. Am I trying to do something I'm not allowed to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2009 22:02:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-12-14T22:02:09Z</dc:date>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182919#M48360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am very new to Qlikview and have a question about using variables in chart expressions. I have a formula that I would like to store in a variable. The reason for wanting to store in a variable is that the formula is going to be used in MANY charts within my application, and I would like to maintain the formula in one spot....in case it needs to change. Here's the formula:&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;B&gt;Sum&lt;/B&gt;(&lt;B&gt;REG_HOURS_NUM&lt;/B&gt; + &lt;B&gt;OVERTIME_HOURS_NUM&lt;/B&gt;)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm placing the formula in a variable called vTest. I then create an expression in my chart as $(vTest). The formula calculates a number, but seems to be unaware of dimensionality in the chart. I have a dimension in my chart for the day of the month, I get the same number, which appears to be just a grand total, for each record in my straight table.&lt;/P&gt;&lt;P&gt;Any help/suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 06:07:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182919#M48360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-10T06:07:10Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182920#M48361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leave the "=" out of the variable definition. The "=" causes it to be evaluated once, when what you want is the expression text.&lt;/P&gt;&lt;P&gt;Use the "=" in the chart expression instead (if required).&lt;/P&gt;&lt;P&gt;=$(vTest)&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 06:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182920#M48361</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-12-10T06:49:10Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182921#M48362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;Thanks for the quick response. It looks like that did it!&lt;/P&gt;&lt;P&gt;I have another expression that uses the Aggr function......shouldn't have any problems with doing that one the same way.....right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 08:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182921#M48362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-10T08:05:51Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182922#M48363</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;DFreeman wrote:shouldn't have any problems with doing that one the same way.....right?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Correct. Always Leave the "=" out the variable definition if you want the expression evaluated in the chart.&lt;/P&gt;&lt;P&gt;Please remember to mark the correct answer with "Verify Answer" button.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 11:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182922#M48363</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-12-10T11:05:50Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182923#M48364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Rob.....didn't know I had to do that. This was my first post on this site. I have now "Verified". Thanks again for the help.&lt;/P&gt;&lt;P&gt;I was thinking that I would load these variables in my load script.....that way I would have a good spot to maintain them. When I try to assign these variables in the load script, I receive an error......specifically in those formulas with the Aggr function. Am I trying to do something I'm not allowed to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 22:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182923#M48364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-14T22:02:09Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182924#M48365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to reference the variable in an expression with this syntax:&lt;/P&gt;&lt;P&gt;$(var)&lt;/P&gt;&lt;P&gt;If that doesn't solve your problem, please post your expression.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 22:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182924#M48365</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-12-14T22:22:59Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182925#M48366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure my last email was very clear. I'm actually having the problem trying to declare the variable.....not when trying to use it.I have this statement in my load script:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Let fPatDays=sum(Aggr(CENSUS_NUM,CALENDAR_DAY,Hospital));&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Here is the error message I get when I try to load my app:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Error in expression: AGGR is not a valid function.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Any advice would be greatly appreciated.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 22:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182925#M48366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-14T22:39:54Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182926#M48367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"LET" evaluates what is to the right of the = sign. In this case, you want to use SET instead, which does not evaluate the value.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt; fPatDays=sum(Aggr(CENSUS_NUM,CALENDAR_DAY,Hospital));&lt;/P&gt;&lt;P&gt;If you wanted to use LET (unnecessary in your example), enclose the value in single quotes.&lt;/P&gt;&lt;P&gt;Let ' fPatDays=sum(Aggr(CENSUS_NUM,CALENDAR_DAY,Hospital)) ';&lt;/P&gt;&lt;P&gt;Mixing literals and expressions would also use LET:&lt;/P&gt;&lt;P&gt;LET vFilemsg = 'The time of the source file is ' &amp;amp; filetime('mydata.txt');&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2009 06:23:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182926#M48367</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-12-15T06:23:31Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182927#M48368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked great.....thanks again Rob. We haven't implemented Qlikview yet.....probably going to happen sometime in Feb 2010. We've already bought the software and are developing just in the client......waiting for the server install.&lt;/P&gt;&lt;P&gt;You have been a really big help to me. I really appreciate it.&lt;/P&gt;&lt;P&gt;I'm still trying to figure out how this site works. I noticed earlier that you asked me to "Verify Answer" on your solution.....which I have done again on this latest solution. I'm guessing this is how you have your Top 10 ranking. The reason I'm asking is that I have another issue I'm trying to deal with that is totally unrelated to this one.....and you seem to have all the answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and I also don't want to monopolize too much of your time. I'm trying to decide if I should just include it in this thread or start another one. Your thoughts?&lt;/P&gt;&lt;P&gt;Thanks again.....I hope I can return the favor one day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2009 09:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182927#M48368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-15T09:54:17Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182928#M48369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if the "Verify Answer" gives points. I don't understand the points system. I note that mine just dropped by a few thousand. Jason, our Webmaster, is known to be arbitrary and capricious. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My primary reason for encouraging Verifies is it helps guide members in identifying threads that still need attention.&lt;/P&gt;&lt;P&gt;I recommend that you start a new thread if you have a new question or issue. It's likely to get more visibility and responses that way.&lt;/P&gt;&lt;P&gt;If you are new to QV you may want to get the QV Cookbook from:&lt;/P&gt;&lt;P&gt;&lt;A href="http://robwunderlich.com/Download.html"&gt;http://robwunderlich.com/Download.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It has some useful examples of basic tasks.&lt;/P&gt;&lt;P&gt;Welcome to Qlikview and the Community!&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2009 13:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182928#M48369</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-12-15T13:07:09Z</dc:date>
    </item>
    <item>
      <title>Expressions in Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182929#M48370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Rob.....and thanks for the cookbook!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2009 21:35:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-in-Variables/m-p/182929#M48370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-15T21:35:34Z</dc:date>
    </item>
  </channel>
</rss>

