<?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: Creating Color Expression for Years on Line Chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081516#M17966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Year(Date) returns a number, not a string. So remove the single quotes around the year values. Also make sure that Date really is a date field and not a field with values that look like dates but are really just strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2016 06:14:26 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-03-29T06:14:26Z</dc:date>
    <item>
      <title>Creating Color Expression for Years on Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081514#M17964</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'm having trouble creating a Color Expression to designate a color for each [Date] Dimension on a line chart.&amp;nbsp; With the data set at hand, the [Date] field is formatted as "MM/DD/YYYY".&amp;nbsp; Because of this, I had to create separate master dimensions for MONTH (x-axis of the chart), and YEAR (each line on the chart is a specific year from 2013-2016).&amp;nbsp; For Year, I used = YEAR([Date]), which has worked well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run into an issue when using a similar logic to set the Color Expression for each Year (i.e. I want the 2016 line to be X color, 2015 to be Y color, etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the color expression I'm using, which currently creates "misses" for all of the IF criteria, and changes each Year's line to Black... the last resort in the IF statement.&amp;nbsp; It would be nice if I could have pulled in the Master Dimensions I created, but that doesn't seem to be an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF(YEAR([Date]) = '2013', &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Red(),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF(YEAR([Date]) = '2014', &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Green(),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF(YEAR([Date]) = '2015', &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Blue(),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF(YEAR([Date]) = '2016', &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Yellow(),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Black()))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&amp;nbsp; Perhaps I'm going about the coloring the wrong way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:43:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081514#M17964</guid>
      <dc:creator />
      <dc:date>2024-11-16T10:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Color Expression for Years on Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081515#M17965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenneth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make use of the colormix() function to create complex colour coding expressions&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=YasIe3VUJrg" style="font-size: 10pt;" title="https://www.youtube.com/watch?v=YasIe3VUJrg"&gt;https://www.youtube.com/watch?v=YasIe3VUJrg&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sangram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2016 18:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081515#M17965</guid>
      <dc:creator>reddy-s</dc:creator>
      <dc:date>2016-03-28T18:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Color Expression for Years on Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081516#M17966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Year(Date) returns a number, not a string. So remove the single quotes around the year values. Also make sure that Date really is a date field and not a field with values that look like dates but are really just strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 06:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-Color-Expression-for-Years-on-Line-Chart/m-p/1081516#M17966</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-29T06:14:26Z</dc:date>
    </item>
  </channel>
</rss>

