<?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: Line chart: Secondary x- axis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926397#M320636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks all for the responses. Unfortunately I was not able to use the method you suggested for any meaningful result. I attach a very simple qvw with 2 metrics and 2 dates that I want to compare by overlaying the two lines. If someone can give any pointers in what I am doing wrong I would be grateful.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2_axis_attempt.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100067_2_axis_attempt.png" style="height: 280px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2015 13:32:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-25T13:32:43Z</dc:date>
    <item>
      <title>Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926391#M320630</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 need to overlay two lines on top of each other for comparison purposes. These two lines measure the same metric but in two different periods of time, which is what is being compared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have only managed to come up with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="line_chart_comparison.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99833_line_chart_comparison.png" style="height: 270px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this is not very useful for comparison, especially when the gap between the red and blue lines widens (because I selected a period way in the past for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is to &lt;STRONG&gt;overlay&lt;/STRONG&gt; these two lines on top of each other, so that I can compare the trend. That would mean that I need a seperate x-axis for each line, and have these 2 x-axis within the same graph area. In this particular example, one axis would have values for 09/2015, while the other for 08/2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I need (watch out for Paint):&lt;/P&gt;&lt;P&gt;&lt;IMG alt="line_chart_overlaid.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/99834_line_chart_overlaid.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Having 2 y-axis within the same graph, but I could not find a way to do the same thing for the x-axis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:29:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926391#M320630</guid>
      <dc:creator />
      <dc:date>2015-09-23T14:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926392#M320631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try to overlay two line charts with transparency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would suggest using something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use two dimensions, Day (Day of Month) and &lt;SPAN style="font-size: 13.3333px;"&gt;Year-Month, &lt;/SPAN&gt;and your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should create two lines over the common dimension Day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 15:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926392#M320631</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-09-23T15:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926393#M320632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't display a dimension on two axes. Create a new field from the date that holds the day of the month of the date: Day(MyDate) as DayOfMonth. Then use that new field as dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 16:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926393#M320632</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-09-23T16:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926394#M320633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dtheodor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get 2 x axis by having 2 dimensions as shown below:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="99863" alt="image20.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99863_image20.png" style="height: 383px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;But I'm not sure if there is a way to get one date dimension on top and the other at the bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an example of what is shown above (which I believe is the same suggestion as made by Gysbert above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 18:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926394#M320633</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2015-09-23T18:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926395#M320634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;U should add the dimension as month or day&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;and writer the expression for current month vs Last month&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;then only you can compare &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 05:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926395#M320634</guid>
      <dc:creator>stephenedberkg</dc:creator>
      <dc:date>2015-09-24T05:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926396#M320635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Camile,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking into your qvw, but I can't seem to make sense of the data that is actually displayed. In particular, I updated the qvw with some more "traditional" line charts that use a single dimension with both values. The lines I get there do not correspond to the lines I get in your graph with the two dimensions. Superficially they may seem that they do, but if you look closely the lines always differ. I think that the data displayed in the 2-dimension graph is bogus. If you have any clues please let me know.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="split_axis.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100066_split_axis.png" style="height: 309px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 13:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926396#M320635</guid>
      <dc:creator />
      <dc:date>2015-09-25T13:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926397#M320636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks all for the responses. Unfortunately I was not able to use the method you suggested for any meaningful result. I attach a very simple qvw with 2 metrics and 2 dates that I want to compare by overlaying the two lines. If someone can give any pointers in what I am doing wrong I would be grateful.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2_axis_attempt.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100067_2_axis_attempt.png" style="height: 280px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 13:32:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926397#M320636</guid>
      <dc:creator />
      <dc:date>2015-09-25T13:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926398#M320637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dtheodor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I misinterpreted your requirement. You only have one date in your data model? (Well I see you derived to dates - but they are really being driven off of the same date shown below):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="image30.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100059_image30.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example you mocked up above - what exactly are you looking to show? I made the assumption that you had two separate dates in your data model - so the example I mocked up generated two separate dates based off of a random number - and then has the data plotted against those 2 dates. Your example only had one date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your data are you expecting the red line to start on 2/4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="image31.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/100060_image31.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camile&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 13:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926398#M320637</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2015-09-25T13:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926399#M320638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The red line to start on 2/4, exactly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get into more detail, not only do I have one date but the metric is also the same. The difference between the two expressions is the set analysis that limits each expression to a different period (something like sum({date &amp;gt;= period1start, date &amp;lt;= period1end} value) ). The goal here is to compare the same metric over 2 periods of time chosen by the user.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 14:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926399#M320638</guid>
      <dc:creator />
      <dc:date>2015-09-25T14:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926400#M320639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's non trivial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The suggested approach above using Day() would be feasable if you are comparing time similar time periods, like Month A vs. Month B. If the user may select any number of days, potentially crossing month borders, and even a different number of days in both selections, then this approach would probably not fit your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless, I added a chart to your sample QVW that demonstrates what I initially envisioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also added a more complex approach that may fit your detailed requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I changed the script to better match what I think you described as your real setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've added an alternate state and a two list boxes for date so the user can select two date ranges.&lt;/P&gt;&lt;P&gt;in the bottom left line chart, I've added a synthetic dimension and some logic to the two expressions, so they both can use a common dimension to draw the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 15:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926400#M320639</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-09-25T15:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926401#M320640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that looks like a solution in the right direction. I was not aware of the alternate state feature until now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's missing now is an improvement in how dates are distributed over the ValueLoop() dimension so that both generated dates can span the full length of the x-axis of the graph. Right now if one period is 1 month and the other period is 2 months, the graph corresponding to the 1 month spans only half of the x axis while the 2nd one spans the whole x-axis. After this change, the feature will fulfil the requirements fully. I'll give it a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 10:48:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926401#M320640</guid>
      <dc:creator />
      <dc:date>2015-09-30T10:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926402#M320641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I achieved some improvement over how the dates span the x-axis. Here's the result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="full_axis_span.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100608_full_axis_span.png" style="height: 474px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;The 6 days of the red period are extended to span the 20 days of the blue period, although this distribution could be done better to span the rightmost points. Also, the dates that appear as text on the axis get too cluttered; after a brief effort I wasn't able to space them apart (by omitting some values)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 10:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926402#M320641</guid>
      <dc:creator />
      <dc:date>2015-10-01T10:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926403#M320642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are going to stretch the red line, the slope of the red line can't be compared directly to the blue one.&lt;/P&gt;&lt;P&gt;You can't even easily read from the chart the value of both lines after same x days after period start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What information do you want to retrieve from this chart then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 14:12:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926403#M320642</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-01T14:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926404#M320643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By stretching the line you enable the trend comparison. (as long as the curvature is maintained and the line is not skewed differently than the original).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 07:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/926404#M320643</guid>
      <dc:creator />
      <dc:date>2015-10-02T07:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Line chart: Secondary x- axis?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/1506700#M436339</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry to reply to an old thread but no one has replied to the&amp;nbsp;new one I created &lt;A href="https://community.qlik.com/t5/Qlik-Community-Help-Discussions/Creating-an-Overlay-Chart-same-data-over-multiple-years/td-p/1505626" target="_blank"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to do this in QlikSense?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 22:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-chart-Secondary-x-axis/m-p/1506700#M436339</guid>
      <dc:creator>Rodney</dc:creator>
      <dc:date>2018-11-14T22:35:52Z</dc:date>
    </item>
  </channel>
</rss>

