<?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: Using variables in charts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146544#M896072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot as it is confidential (work material). But for example, I have a line chart with one expression. This expression is being represented with point symbols (not line). Then depending on some conditions I want each points of the same expression to be painted with red, yellow or red color. Is it possible to paint each point of the same expression with different colors based on condition? I think this is the problem, in the same expression maybe it is not possible so all the points in my case are painted with the same color. How can I do this? better to add another post for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Aug 2016 10:48:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-08T10:48:59Z</dc:date>
    <item>
      <title>Using variables in charts</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146539#M896067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a line chart. In one of the expressions I use symbols (Points) to represent it. I want each of these points to be painted with one color of another depending of some conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I defined background color using this expression (method 1):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;target_orders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is a variable that I have defined as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(numOrders &amp;lt; 10, Green(), If(numOrders &amp;gt;= 10 and numOrders &amp;lt;= 50, Yellow(), Red()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and numOrders is another variable as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;[Order Type] = {'A'}&amp;gt;}if([quantity] &amp;gt; 20000.0, 1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it seems background color is not correctly being displayed for each point in the chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method 2&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;However if I put the full expression as background color as below (without using variables):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(sum({$&amp;lt;[Order Type] = {'A'}&amp;gt;}if([quantity] &amp;gt; 20000.0, 1,0)) &amp;lt; 10, Green(), If(&lt;SPAN style="font-size: 13.3333px;"&gt;sum({$&amp;lt;[Order Type] = {'A'}&amp;gt;}if([quantity] &amp;gt; 20000.0, 1,0))&lt;/SPAN&gt; &amp;gt;= 10 and &lt;SPAN style="font-size: 13.3333px;"&gt;sum({$&amp;lt;[Order Type] = {'A'}&amp;gt;}if([quantity] &amp;gt; 20000.0, 1,0))&lt;/SPAN&gt; &amp;lt;= 50, Yellow(), Red()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then each point is being displayed with the correct color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So why QlikView is interpreting it differently if I use method 1 or method 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use variables as expression is clearer and readable than putting the full&amp;nbsp; expression in method 2.&lt;/P&gt;&lt;P&gt;How can I obtain the same results as method 2 using variables in method 1?&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/Using-variables-in-charts/m-p/1146539#M896067</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in charts</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146540#M896068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you will need to play around with dollar sign expansion or try adding or removing equal sign from the variable definition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 09:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146540#M896068</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-08T09:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in charts</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146541#M896069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doing this seems the behaviour is the same as method 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Background color expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(=target_orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;which is a variable that I have defined as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if($(=numOrders) &amp;lt; 10, Green(), If($(=numOrders) &amp;gt;= 10 and $(=numOrders) &amp;lt;= 50, Yellow(), Red()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and numOrders is another variable as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({$&amp;lt;[Order Type] = {'A'}&amp;gt;}if([quantity] &amp;gt; 20000.0, 1,0))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The problem now is that all the symbols (points) are being painted with the same color.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 10:39:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146541#M896069</guid>
      <dc:creator />
      <dc:date>2016-08-08T10:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in charts</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146542#M896070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 10:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146542#M896070</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-08T10:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in charts</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146543#M896071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your variables should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(target_orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if($(numOrders) &amp;lt; 10, Green(), If($(numOrders) &amp;gt;= 10 and $(numOrders) &amp;lt;= 50, Yellow(), Red()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 10:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146543#M896071</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-08-08T10:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using variables in charts</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146544#M896072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot as it is confidential (work material). But for example, I have a line chart with one expression. This expression is being represented with point symbols (not line). Then depending on some conditions I want each points of the same expression to be painted with red, yellow or red color. Is it possible to paint each point of the same expression with different colors based on condition? I think this is the problem, in the same expression maybe it is not possible so all the points in my case are painted with the same color. How can I do this? better to add another post for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2016 10:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variables-in-charts/m-p/1146544#M896072</guid>
      <dc:creator />
      <dc:date>2016-08-08T10:48:59Z</dc:date>
    </item>
  </channel>
</rss>

