<?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 Weird behaviour when using variables in chart expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123516#M900249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expression thtat is repeated a lot in my document and it is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;[Type] = {'type_A'}&amp;gt;}if(duration &amp;gt; 0.0, 1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I put it into a variable called totalbreakdown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use that variable for one of my expressions in the chart (tab expressions) and I assign the variable to it in field definition as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;totalbreakdown&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;then I do not get the same result in chart that if I put the complete expression in the field definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;=sum({$&amp;lt;[Type] = {'type_A'}&amp;gt;}if(duration &amp;gt; 0.0, 1,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;So why¿?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Weird behaviour when using variables in chart expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123516#M900249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expression thtat is repeated a lot in my document and it is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;[Type] = {'type_A'}&amp;gt;}if(duration &amp;gt; 0.0, 1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I put it into a variable called totalbreakdown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use that variable for one of my expressions in the chart (tab expressions) and I assign the variable to it in field definition as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;totalbreakdown&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;then I do not get the same result in chart that if I put the complete expression in the field definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;=sum({$&amp;lt;[Type] = {'type_A'}&amp;gt;}if(duration &amp;gt; 0.0, 1,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;So why¿?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123516#M900249</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Weird behaviour when using variables in chart expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123517#M900250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with this.&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: 13.3333px;"&gt;=sum({$&amp;lt;[Type] = {'type_A'}&amp;gt;}if(duration &amp;gt; 0.0, duration,0))&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: 13.3333px;"&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: 13.3333px;"&gt;You need to change 1 fort your measure, because 1 only express that you want to show something, but aren´t using any measure.&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: 13.3333px;"&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: 13.3333px;"&gt;Regards&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: 13.3333px;"&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: 13.3333px;"&gt;Miguel del Valle&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 09:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123517#M900250</guid>
      <dc:creator>migueldelval</dc:creator>
      <dc:date>2016-07-22T09:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Weird behaviour when using variables in chart expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123518#M900251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The result might be depending on the way you are defining your variables and how you call them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3996"&gt;The Little Equals Sign&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 09:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123518#M900251</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-07-22T09:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Weird behaviour when using variables in chart expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123519#M900252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this expression I am trying to get the number of tuples of type "Type_A" which have a duration value greater than 0.0 so no need to change 1 by duration. Changing by duration you are obtaining the sum of all duration that complains duration &amp;gt; 0.0 and this is not what I want. Anyway my problem is that my chart is displaying different values depending on the value I assign to one of the expressions, if I assign the variable it displays a result that is different from the result that is displayed when I put the variable content directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 10:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-behaviour-when-using-variables-in-chart-expressions/m-p/1123519#M900252</guid>
      <dc:creator />
      <dc:date>2016-07-22T10:46:34Z</dc:date>
    </item>
  </channel>
</rss>

