<?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: Color measurements in line chart by color in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Line-chart-How-to-set-the-color-Green-or-Red-to-different/m-p/1894693#M73809</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;An update on my progressions.&lt;BR /&gt;I managed to color the lines individually, but only if I set the second measure "Amount + Additional" as an alternative measure.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_0-1645173356384.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72597iF55F798993EE8063/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_0-1645173356384.png" alt="Sebb_0-1645173356384.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_2-1645173941366.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72599i7771EC2C1DE60840/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_2-1645173941366.png" alt="Sebb_2-1645173941366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;By setting the following expression in the "Colors and legend" setting:&lt;/P&gt;
&lt;P&gt;=If(GetObjectMeasure()='Amount' and [Amount] &amp;lt; 0&lt;BR /&gt;, rgb(255, 0, 0)&lt;BR /&gt;, If(GetObjectMeasure()='Amount + Additional' and [Amount + Additional] &amp;lt; 0&lt;BR /&gt;, rgb(255, 0, 0)&lt;BR /&gt;, rgb(48, 122, 66)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;Please have a look at the attached QVF.&lt;/P&gt;
&lt;P&gt;When I drag the alternative measure back to the list of measures the expression doesn't color the individual lines.&lt;BR /&gt;So there must be some other way to make it work to have both measures in the same line chart, but individually colored...&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Sebb&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2022 08:45:58 GMT</pubDate>
    <dc:creator>SBDataspark</dc:creator>
    <dc:date>2022-02-18T08:45:58Z</dc:date>
    <item>
      <title>Line chart: How to set the color Green or Red to different measures when above or below zero</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-How-to-set-the-color-Green-or-Red-to-different/m-p/1894294#M73768</link>
      <description>&lt;P&gt;Hi there fellow Qlik Sense enthousiasts,&lt;/P&gt;
&lt;P&gt;In the attached qvd I've created a small setup of what I'm trying to achieve.&lt;BR /&gt;Which is the following.&lt;/P&gt;
&lt;P&gt;I have added an inline table with transactions with an amount linked to a date.&lt;BR /&gt;The transactions can be positive or negative amounts.&lt;BR /&gt;The cumulative sum is plotted in a line chart.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_0-1645101183588.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72527iEA71C81788FA60C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_0-1645101183588.png" alt="Sebb_0-1645101183588.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And the color of the line is set by expression:&lt;/P&gt;
&lt;P&gt;=If(RangeSum(Above(Sum(Amount),0,RowNo())) &amp;lt; 0 &lt;BR /&gt;, rgb(255, 0, 0)&lt;BR /&gt;, rgb(48, 122, 66)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;So far pretty straight forward.&lt;/P&gt;
&lt;P&gt;To manipulate the cumulative sum for the amounts per month I've added a variable input field.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_1-1645101406187.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72529i9D81A49609D74AC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_1-1645101406187.png" alt="Sebb_1-1645101406187.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When you put in a particular amount a second line is created to plot the "Amount + Additional amount" with expression: RangeSum(Above(Sum(Amount),0,RowNo())) + $(vAdditionalAmount)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_2-1645101549267.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72530i15E8697F76542ADF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_2-1645101549267.png" alt="Sebb_2-1645101549267.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see the two lines are colored the same way.&lt;/P&gt;
&lt;P&gt;I've tried numerous things to get each line to color individually red or green when it's below or above the zero marker line.&lt;BR /&gt;On the forum I found all sorts of solutions for coloring measurements, but unfortunately I can't get it to work.&lt;/P&gt;
&lt;P&gt;Here is another post which asks a similar question, but hasn't been answered yet:&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/App-Development/Color-Line-Chart-by-Segmented-Colors-in-Master-Measures/td-p/1595241" target="_blank" rel="noopener"&gt;Color Line Chart by Segmented Colors in Master Mea... - Qlik Community - 1595241&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Does anyone have an idea how to achieve this?&lt;BR /&gt;Please feel free to fiddle with the attached qvd and upload your adjustments.&lt;BR /&gt;Thanks in advance for your time and efforts!!&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Sebb.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 12:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-How-to-set-the-color-Green-or-Red-to-different/m-p/1894294#M73768</guid>
      <dc:creator>SBDataspark</dc:creator>
      <dc:date>2022-02-21T12:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Color measurements in line chart by color</title>
      <link>https://community.qlik.com/t5/App-Development/Line-chart-How-to-set-the-color-Green-or-Red-to-different/m-p/1894693#M73809</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;An update on my progressions.&lt;BR /&gt;I managed to color the lines individually, but only if I set the second measure "Amount + Additional" as an alternative measure.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_0-1645173356384.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72597iF55F798993EE8063/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_0-1645173356384.png" alt="Sebb_0-1645173356384.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sebb_2-1645173941366.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72599i7771EC2C1DE60840/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sebb_2-1645173941366.png" alt="Sebb_2-1645173941366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;By setting the following expression in the "Colors and legend" setting:&lt;/P&gt;
&lt;P&gt;=If(GetObjectMeasure()='Amount' and [Amount] &amp;lt; 0&lt;BR /&gt;, rgb(255, 0, 0)&lt;BR /&gt;, If(GetObjectMeasure()='Amount + Additional' and [Amount + Additional] &amp;lt; 0&lt;BR /&gt;, rgb(255, 0, 0)&lt;BR /&gt;, rgb(48, 122, 66)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;Please have a look at the attached QVF.&lt;/P&gt;
&lt;P&gt;When I drag the alternative measure back to the list of measures the expression doesn't color the individual lines.&lt;BR /&gt;So there must be some other way to make it work to have both measures in the same line chart, but individually colored...&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Sebb&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 08:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Line-chart-How-to-set-the-color-Green-or-Red-to-different/m-p/1894693#M73809</guid>
      <dc:creator>SBDataspark</dc:creator>
      <dc:date>2022-02-18T08:45:58Z</dc:date>
    </item>
  </channel>
</rss>

