<?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 Using two dimensions and two expressions on a line chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773241#M274343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read multiple posts with multiple answers on whether one can successfully have two dimensions with two expressions on the same line chart. In my example, I do not believe that I can do the above and will need to resort to creating one dimension; however, I am having some difficulty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sample data consists of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ServiceRecordNumber&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;PartNumber&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;ShipYear&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ServiceRecordYear&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2009&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2010&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2009&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2010&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to be able to plot both the [ShipYear] and [ServiceRecordYear] on the same dimension (i..e x-axis) for all the parts listed above.&amp;nbsp; If I chart each field separately; meaning I create one chart with [ShipYear] as the dimension and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;[ShipYear]={2010, 2011, 2012}&amp;gt;}[PartNumber])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as the expression, the chart is fine. However, if I use both [ShipYear] and [ServiceRecordYear] as the dimensions and with similar expressions as above, the results are not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have all of the above information in one table, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load [ServiceRecordNumber],&lt;/P&gt;&lt;P&gt;[PartNumber],&lt;/P&gt;&lt;P&gt;[ShipYear],&lt;/P&gt;&lt;P&gt;[ServiceRecordYear];&lt;/P&gt;&lt;P&gt;from XYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I do not believe that I can use concatenation since all of my data is in one table.&amp;nbsp; The real data is stored in an Access database and is set up similarly as the above table. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen where I may need to use either a data island "master calendar" to handle this situation; however, this is where I ran in to difficulty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a table with a named field [XaxisYear] that holds generic years 1995-2015, and it is not linked, it is a "data island".&amp;nbsp; I used [XaxisYear] as the single dimension and then created similar counting expressions as above using [ShipYear] and [ServiceRecordYear].&amp;nbsp; I am not sure what QlikView counted, but the results are not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, I am going to create separate charts since that does work and I can continue onwards.&amp;nbsp; Being able to chart both [ShipYear] and [ServiceRecordYear] on the same chart will be the enhancement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always, any advice is greatly appreciated.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;-Jill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 20:26:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-09T20:26:11Z</dc:date>
    <item>
      <title>Using two dimensions and two expressions on a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773241#M274343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read multiple posts with multiple answers on whether one can successfully have two dimensions with two expressions on the same line chart. In my example, I do not believe that I can do the above and will need to resort to creating one dimension; however, I am having some difficulty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sample data consists of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ServiceRecordNumber&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;PartNumber&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;ShipYear&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ServiceRecordYear&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2009&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2010&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2009&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2010&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to be able to plot both the [ShipYear] and [ServiceRecordYear] on the same dimension (i..e x-axis) for all the parts listed above.&amp;nbsp; If I chart each field separately; meaning I create one chart with [ShipYear] as the dimension and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;[ShipYear]={2010, 2011, 2012}&amp;gt;}[PartNumber])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as the expression, the chart is fine. However, if I use both [ShipYear] and [ServiceRecordYear] as the dimensions and with similar expressions as above, the results are not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have all of the above information in one table, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load [ServiceRecordNumber],&lt;/P&gt;&lt;P&gt;[PartNumber],&lt;/P&gt;&lt;P&gt;[ShipYear],&lt;/P&gt;&lt;P&gt;[ServiceRecordYear];&lt;/P&gt;&lt;P&gt;from XYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I do not believe that I can use concatenation since all of my data is in one table.&amp;nbsp; The real data is stored in an Access database and is set up similarly as the above table. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen where I may need to use either a data island "master calendar" to handle this situation; however, this is where I ran in to difficulty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a table with a named field [XaxisYear] that holds generic years 1995-2015, and it is not linked, it is a "data island".&amp;nbsp; I used [XaxisYear] as the single dimension and then created similar counting expressions as above using [ShipYear] and [ServiceRecordYear].&amp;nbsp; I am not sure what QlikView counted, but the results are not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, I am going to create separate charts since that does work and I can continue onwards.&amp;nbsp; Being able to chart both [ShipYear] and [ServiceRecordYear] on the same chart will be the enhancement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always, any advice is greatly appreciated.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;-Jill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 20:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773241#M274343</guid>
      <dc:creator />
      <dc:date>2015-02-09T20:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using two dimensions and two expressions on a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773242#M274344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way of doing it by using one "Year"-field and splitting up the data i Source instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// First we load the data&lt;/P&gt;&lt;P&gt;TempFacts:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServiceRecordNumber, PartNumber, ShipYear, ServiceRecordYear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, A, 2009, 2010&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, A, 2009, 2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, A, 2010, 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, A, 2011, 2014&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, A, 2012, 2012&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Then we take the "Shipping Data"&lt;/P&gt;&lt;P&gt;Facts:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ServiceRecordNumber,&lt;/P&gt;&lt;P&gt;PartNumber,&lt;/P&gt;&lt;P&gt;ShipYear as Year,&lt;/P&gt;&lt;P&gt;'Shipping Data' AS Source&lt;/P&gt;&lt;P&gt;Resident TempFacts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Then we take the "Service Data"&lt;/P&gt;&lt;P&gt;Concatenate(Facts)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ServiceRecordNumber,&lt;/P&gt;&lt;P&gt;PartNumber,&lt;/P&gt;&lt;P&gt;ServiceRecordYear as Year,&lt;/P&gt;&lt;P&gt;'Service Data' AS Source&lt;/P&gt;&lt;P&gt;Resident TempFacts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TempFacts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once loaded we can present the following two values on the same Year-axis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT({&amp;lt;Source={'Service Data'}&amp;gt;} DISTINCT PartNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT({&amp;lt;Source={'Shipping Data'}&amp;gt;} DISTINCT PartNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alternative (maybe more correct) approach is to follow the Canonical Date concept:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3585"&gt;Canonical Date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niklas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 20:47:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773242#M274344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T20:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using two dimensions and two expressions on a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773243#M274345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Niklas for the speedy response.&amp;nbsp; I will try your method and also the Canonical Date method as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 20:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-two-dimensions-and-two-expressions-on-a-line-chart/m-p/773243#M274345</guid>
      <dc:creator />
      <dc:date>2015-02-09T20:59:43Z</dc:date>
    </item>
  </channel>
</rss>

