<?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 load/save calculated variable to QVD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350678#M494573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This kind of expressions are only available for tables or graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script, the dinamic variables (those that have an expression, not a value) never take their value to the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must make a action, that "Stablish another Variable" with the value of the expression. This variable will be static, and their value would be usable in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will send your example...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2012 16:07:40 GMT</pubDate>
    <dc:creator>sebastiandperei</dc:creator>
    <dc:date>2012-03-13T16:07:40Z</dc:date>
    <item>
      <title>load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350671#M494566</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;Currently reciving a file daily and I need to calculate some stuff from it and then save that to a QVD.&lt;/P&gt;&lt;P&gt;Expressions are loaded from excel and used in pivot.&lt;/P&gt;&lt;P&gt;When I do this&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;'=$(vM_Merchants_ant)' as meracants&lt;/P&gt;&lt;P&gt;AutoGenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I save the expression, I need to save the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 14:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350671#M494566</guid>
      <dc:creator />
      <dc:date>2012-03-13T14:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350672#M494567</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;Please find the attached file for solution.&amp;nbsp; Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 14:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350672#M494567</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-13T14:43:55Z</dc:date>
    </item>
    <item>
      <title>load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350673#M494568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jagan, no!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can save the expression, or in your example a number. The question is how to save a result from an expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 15:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350673#M494568</guid>
      <dc:creator />
      <dc:date>2012-03-13T15:08:24Z</dc:date>
    </item>
    <item>
      <title>load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350674#M494569</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;Anyway, depends on the way you have defined the variable. For example, If you defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Let vVar = Sum(Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vVar will take the result of the expression in script, and it will never changes their value. &lt;/P&gt;&lt;P&gt;In case you define like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Set vVar = '=Sum(Sales)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vVar will get the text of the expression ('=' included), and it will recalculate the value in every selection.&lt;/P&gt;&lt;P&gt;In both cases, the solution is different:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;load&lt;BR /&gt;'$(vM_Merchants_ant)' as meracants&lt;BR /&gt;AutoGenerate 1;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;Depends on the content you have assigned to the var. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, specify the script lines you have used to assign the data to the variable, and what kind of data will get the involved fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 15:11:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350674#M494569</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-03-13T15:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350675#M494570</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;Instead of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vValue = 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use your expression, and save that variable value in the QVD file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope the updated file helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 15:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350675#M494570</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-13T15:12:55Z</dc:date>
    </item>
    <item>
      <title>load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350676#M494571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a copy from the excel that I use to load variables,&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 866pt;" width="1155"&gt;&lt;TBODY&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15.0pt; width: 110pt;" width="147"&gt;vM_Merchants_ant&lt;/TD&gt;&lt;TD class="xl65" style="width: 756pt;" width="1008"&gt;num(Sum({$&amp;lt; Year=,&amp;nbsp; MonthNum=,Quarter=,[Org.nummer] = {"=len([Org.nummer]) &amp;gt;&amp;nbsp; 0"},[Moder/Dotter]-={'M'},numAvslutsdatum={0} &amp;gt;&amp;nbsp; }bCounter),'# ##0,')&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 15:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350676#M494571</guid>
      <dc:creator />
      <dc:date>2012-03-13T15:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350677#M494572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this in a load script. I want you to save the result of the expression (530) in a QVD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LET vVar='=sum({&amp;lt;region={1}&amp;gt;}sales)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sales:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;region,sales&lt;/P&gt;&lt;P&gt;1,200&lt;/P&gt;&lt;P&gt;1,330&lt;/P&gt;&lt;P&gt;2,300];&lt;/P&gt;&lt;P&gt;&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;$(vVar) AS Value&lt;/P&gt;&lt;P&gt;AUTOGENERATE 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 15:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350677#M494572</guid>
      <dc:creator />
      <dc:date>2012-03-13T15:32:10Z</dc:date>
    </item>
    <item>
      <title>load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350678#M494573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This kind of expressions are only available for tables or graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script, the dinamic variables (those that have an expression, not a value) never take their value to the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must make a action, that "Stablish another Variable" with the value of the expression. This variable will be static, and their value would be usable in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will send your example...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 16:07:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350678#M494573</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-03-13T16:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350679#M494574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In attached you get 2 ways to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first, is using your expression variable. The action is triggered when the reload ends. Then, takes the value of vVar and put it in vV variable. In next reload, it will get this value (in table 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must to know that the script area will never recognize the set analisis, only static variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other way is shown in script. Obviously, with my example is easier than your variable, but if you must do the calculation in reload time, it's the only way to do it, doing the relationships and aggregations (group by, where, if, etc....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, let me know if this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 17:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350679#M494574</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-03-13T17:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350680#M494575</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;I get stuck between a not defined variable and the fact that when reloading I set the variable to '' again.&lt;/P&gt;&lt;P&gt;Is it possible to declair a variable with a condition?&lt;/P&gt;&lt;P&gt;If I don't create the new variable to hold the value it don't get set. But if I do, then I put it back to '' when reloading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'd like to create it with a condition (pseudo for if not '' then as is else create as ''&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;let if(vxM_Merchants_ant&amp;lt;&amp;gt;'',vxM_Merchants_ant=vxM_Merchants_ant,vxM_Merchants_ant='');&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 07:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350680#M494575</guid>
      <dc:creator />
      <dc:date>2012-03-14T07:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: load/save calculated variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350681#M494576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The structure is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vxM_Merchants_ant &amp;lt;&amp;gt;'' then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vxM_Merchants_ant=vxM_Merchants_ant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (why want to do this??);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vxM_Merchants_ant='';&lt;/P&gt;&lt;P&gt;End If;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, this conditional has 2 contradictions:&lt;/P&gt;&lt;P&gt;- If V&amp;lt;&amp;gt;'' then &lt;SPAN style="text-decoration: underline;"&gt;V=V?????&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- if V='' THEN V=""&amp;nbsp;&amp;nbsp; (the second chance of IF will occur when the condition is false, or the opposite of the condicion is true, like this case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my bad engrlish, but i cant understand what you needs... Try to explain better please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 12:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-save-calculated-variable-to-QVD/m-p/350681#M494576</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-03-14T12:51:36Z</dc:date>
    </item>
  </channel>
</rss>

