<?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: Chart is not updated automatically if variable is used as Expression (requires refresh) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171520#M21397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Constructed the variable using chr() and concatenations." &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sorry, that's what I meant by "escaping". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I've submitted this case to Qlik support, will see what they will tell about this "refreshing" issue" .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I'll be curious to hear if they come back with anything other than "unsupported" on an extension issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2016 15:43:41 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2016-07-18T15:43:41Z</dc:date>
    <item>
      <title>Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171514#M21391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've noticed a strange issue:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I do have a chart that uses variables in Set Analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;//Variables defined in the script:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;let vDR1Start = Num(MakeDate(2016,6,20));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;let vDR1End = Num(MakeDate(2016,6,27));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;let vDR2Start = Num(MakeDate(2016,5,20));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;let vDR2End = Num(MakeDate(2016,5,28));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;These variables are defining the range of dates the chart is displaying the numbers for (Start/End of Periods 1 and 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Set Analysis looks like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="color: #808080; text-decoration: underline;"&gt;sum({&amp;lt;Date = {"=(Date&amp;lt;='$(vDR1End)' and Date&amp;gt;='$(vDR1Start)')"}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart is working properly and is updated as soon as variables are updated in the app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping to create a single variable to use in all related charts in the application.&lt;/P&gt;&lt;P&gt;This new variable in the script looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set vSumPeriod1 = sum({&amp;lt;Date = {"=(Date&amp;lt;=vDR1End and Date&amp;gt;=vDR1Start)"}&amp;gt;} Sales);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if this &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;vSumPeriod1 &lt;/STRONG&gt;&lt;/SPAN&gt;variable is used in chart's measure, the chart is &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;not updated&lt;/STRONG&gt;&lt;/SPAN&gt; automatically as soon as variable is changed!&lt;/P&gt;&lt;P&gt;It requires a "refresh" - for example if ANY field is selected and cleared - the chart is immediately updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the demo application to this post so the issue will be more visible.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The chart on the right is using "normal" Set Analysis, the one on the left uses variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To change variables, I am using an extension from the Branch (&lt;A href="http://branch.qlik.com/#!/project/56728f52d1e497241ae697f8" title="http://branch.qlik.com/#!/project/56728f52d1e497241ae697f8" target="_blank"&gt;Qlik Branch&lt;/A&gt;)(also attached).&lt;/P&gt;&lt;P&gt;You can enter Dates as Numeric or Date formats, it does not matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really puzzled with this issue. Not sure if it's a bug in QS or I need to update my Expression's variable differently to handle this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will appreciate an advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171514#M21391</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2024-11-16T10:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171515#M21392</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;Try to create the variable in frontend, instead of in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you create variable in frontend then it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jul 2016 06:32:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171515#M21392</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-07-16T06:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171516#M21393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, it does not work (I've tried it - see updated app in attachment). Second of all, I need to share these variables between multiple applications, so I need to have them generated in the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jul 2016 14:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171516#M21393</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2016-07-16T14:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171517#M21394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vlad, It works for me if I define the variable same as the expression. That is, including the '$()' around the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum({&amp;lt;Date = {"=(Date&amp;lt;='$(vDR2End)' and Date&amp;gt;='$(vDR2Start)')"}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to escape those $ if you want to set the variable in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Not sure if it's a bug in QS ..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Keep in mind that you are using an extension, not a supported component. If it did not work, it would be hard to characterize that as a QS bug.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com/" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jul 2016 18:43:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171517#M21394</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-07-17T18:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171518#M21395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;I've tried your suggestion, but it does not work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart is updated only if the "refresh" is called (as I've mentioned in the original post, the "refresh" event is caused by selecting/clearing any field in the app, or updating chart's properties, the Title for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand your concern about updating variables by extension, but as you can see in the app (the updated QVF is attached) the variables are updated immediately and it's shown in the Text objects...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've submitted this case to Qlik support, will see what they will tell about this "refreshing" issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 00:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171518#M21395</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2016-07-18T00:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171519#M21396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used your suggestion and improved it a bit further. Constructed the variable using chr() and concatenations.&lt;/P&gt;&lt;P&gt;It works perfectly now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the variable constructed in the script:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;let vSumPeriod1R_Script = 'sum({&amp;lt;Date = {"=(Date&amp;lt;=' &amp;amp; chr(39) &amp;amp; chr(36) &amp;amp; chr(40) &amp;amp; 'vDR1End' &amp;amp; chr(41) &amp;amp; chr(39) &amp;amp; ' and Date&amp;gt;=' &amp;amp; chr(39) &amp;amp; chr(36) &amp;amp; chr(40) &amp;amp; 'vDR1Start' &amp;amp; chr(41) &amp;amp; chr(39) &amp;amp; ')"}&amp;gt;} Sales)'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and a suggestion!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 01:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171519#M21396</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2016-07-18T01:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171520#M21397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Constructed the variable using chr() and concatenations." &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sorry, that's what I meant by "escaping". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I've submitted this case to Qlik support, will see what they will tell about this "refreshing" issue" .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I'll be curious to hear if they come back with anything other than "unsupported" on an extension issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171520#M21397</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-07-18T15:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Chart is not updated automatically if variable is used as Expression (requires refresh)</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171521#M21398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've read your mind than... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will post a reply from Support if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:46:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/m-p/1171521#M21398</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2016-07-18T15:46:57Z</dc:date>
    </item>
  </channel>
</rss>

