<?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: How to show last year as one column and year_month for current year on same plot in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1910470#M1218101</link>
    <description>&lt;P&gt;You could do this will a rolling calc maybe?&amp;nbsp; Dimension will be whatever needed but not your date/month field.&amp;nbsp; Then an expression to show -15 to -3 months from current month, then another to do -6 to -3 months from current month, then current month -2, then -1 and then current month, this way you wont need to change it again in the future?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 09:36:11 GMT</pubDate>
    <dc:creator>dmac1971</dc:creator>
    <dc:date>2022-03-28T09:36:11Z</dc:date>
    <item>
      <title>How to show last year as one column and year_month for current year on same plot</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1910300#M1218089</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to show the average results of last year sales as 1 column, then the average results of last year's last trimster sales on a second column and then have one column per month to show the current year results.&lt;/P&gt;
&lt;P&gt;Can I do that on only 1 plot? Best I could get so far was to have year_month columns for current year and use reference lines to show the averages of last year and last year's last trimester which isn't exactly my need.&lt;/P&gt;
&lt;P&gt;What I'd like:&lt;/P&gt;
&lt;DIV id="tinyMceEditorAntSto_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qliksense_need.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/75405i9CE81B77D7E7B198/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Qliksense_need.png" alt="Qliksense_need.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;and what&amp;nbsp; I get:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qliksense_so_far.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/75406iEB280F92EA94758E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Qliksense_so_far.png" alt="Qliksense_so_far.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; Thanks for your time!&lt;/P&gt;
&lt;DIV id="tinyMceEditorAntSto_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;EDIT: I managed to get last year showing up as year and year_month for 2022 with an expression like this:&lt;/P&gt;
&lt;P&gt;=If( [Date_col.autoCalendar.Year] LIKE '2022', [Date_col.autoCalendar.YearMonth],[Date_col.autoCalendar.Year])&lt;/P&gt;
&lt;P&gt;So this is good but I'm unsure if I could add the last year's last trimester on the same axis too (or maybe I need to double the lines for last trimester with a new col that will act as a condition check for x-axis?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 09:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1910300#M1218089</guid>
      <dc:creator>AntSto</dc:creator>
      <dc:date>2022-03-29T09:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to show last year as one column and year_month for current year on same plot</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1910470#M1218101</link>
      <description>&lt;P&gt;You could do this will a rolling calc maybe?&amp;nbsp; Dimension will be whatever needed but not your date/month field.&amp;nbsp; Then an expression to show -15 to -3 months from current month, then another to do -6 to -3 months from current month, then current month -2, then -1 and then current month, this way you wont need to change it again in the future?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 09:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1910470#M1218101</guid>
      <dc:creator>dmac1971</dc:creator>
      <dc:date>2022-03-28T09:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to show last year as one column and year_month for current year on same plot</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1911007#M1218131</link>
      <description>&lt;P&gt;thank you for the suggestion but I'd like to have the last year and last year's trimester be fixed, even when I'll be in october and not have a rolling calc if possible.&lt;/P&gt;
&lt;P&gt;But I think you pointed something intersting I could maybe calculate which month I'm in and from that get the last year. I'll try and post it here if I can manage something working!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 08:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1911007#M1218131</guid>
      <dc:creator>AntSto</dc:creator>
      <dc:date>2022-03-29T08:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to show last year as one column and year_month for current year on same plot</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1911090#M1218135</link>
      <description>&lt;P&gt;I managed to do it by loading the table twice and adding one extra column(second_loading) that I set to 0 in one table and to 1 in the other.&lt;/P&gt;
&lt;P&gt;Then for my axis I use this:&lt;/P&gt;
&lt;P&gt;```&lt;/P&gt;
&lt;P&gt;=If(&lt;BR /&gt;[&lt;SPAN&gt;Date_col.&lt;/SPAN&gt;autoCalendar.Year] LIKE '2022',&lt;BR /&gt;[&lt;SPAN&gt;Date_col&lt;/SPAN&gt;.autoCalendar.YearMonth],&lt;BR /&gt;if([&lt;SPAN&gt;Date_col&lt;/SPAN&gt;.autoCalendar.YearQuarter] LIKE '2021-Q4' and [second_loading] = 0,&lt;BR /&gt;[&lt;SPAN&gt;Date_col&lt;/SPAN&gt;.autoCalendar.YearQuarter],&lt;BR /&gt;[&lt;SPAN&gt;Date_col&lt;/SPAN&gt;.autoCalendar.Year]))&lt;/P&gt;
&lt;P&gt;```&lt;/P&gt;
&lt;P&gt;Then I need to make sure values are only counted once with distinct:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AntSto_0-1648548009334.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/75589i8A0DA18822A914E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AntSto_0-1648548009334.png" alt="AntSto_0-1648548009334.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 10:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-last-year-as-one-column-and-year-month-for-current/m-p/1911090#M1218135</guid>
      <dc:creator>AntSto</dc:creator>
      <dc:date>2022-03-29T10:00:24Z</dc:date>
    </item>
  </channel>
</rss>

