<?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: Last year values in combined set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637606#M732818</link>
    <description>&lt;P&gt;No ideas?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 06:29:09 GMT</pubDate>
    <dc:creator>Hoowling</dc:creator>
    <dc:date>2019-10-21T06:29:09Z</dc:date>
    <item>
      <title>Last year values in combined set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1634690#M732817</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a graph that looks like this, where the scrapped value (Skrotvärde (kr)) and the scrapped value per machine hour (Kostnad per timme (kr)) is presented.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21370i7D8A47109C50B4DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expression for "kostnad per timme (kr)" is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;-sum(Price)/&lt;BR /&gt;Sum({1&amp;lt;&amp;nbsp;&lt;BR /&gt;YearMonth = $::YearMonth,&lt;BR /&gt;Year = $::Year,&lt;BR /&gt;ScrapLocation = $::ScrapLocation,&lt;BR /&gt;Month = $::Month,&lt;BR /&gt;Produktionsgrupp = $::Produktionsgrupp&lt;/P&gt;&lt;P&gt;&amp;gt;}MachineHours)&lt;/P&gt;&lt;P&gt;The negative sign is used since "Price" (which is the scrapped value) is reported with negative values.&amp;nbsp;&lt;BR /&gt;I've used a set analysis so that only certain selections will affect the graph.&amp;nbsp;&lt;BR /&gt;Now I want to add a line to the graph where the scrappad value per machine hour is presented for &lt;STRONG&gt;the prior year&lt;/STRONG&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Normally I would use an expression like this:&amp;nbsp;sum({$&amp;lt;Year={$(=Max(Year)-1)}&amp;gt; } [Price]).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But how do I incorporate the Max(Year)-1 part into the expression above where I already use the set analysis to exclude certain selections? I've tried to play around with the expression but havn't been able to find the right one.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;//Hoowling&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:13:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1634690#M732817</guid>
      <dc:creator>Hoowling</dc:creator>
      <dc:date>2024-11-16T02:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Last year values in combined set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637606#M732818</link>
      <description>&lt;P&gt;No ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 06:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637606#M732818</guid>
      <dc:creator>Hoowling</dc:creator>
      <dc:date>2019-10-21T06:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Last year values in combined set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637632#M732819</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I think that the expression&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;-sum(Price)/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Sum({1&amp;lt;&amp;nbsp;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;YearMonth = $::YearMonth,&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#99CC00"&gt;Year={$(=Max(Year)-1)},&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ScrapLocation = $::ScrapLocation,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Month = $::Month,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Produktionsgrupp = $::Produktionsgrupp&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;}MachineHours)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;should work &lt;FONT color="#FF0000"&gt;EXCEPT&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#333333"&gt;for selections in YearMonth because joins (current) Year and Month. The easiest way to solve it is to remove the&amp;nbsp;&lt;SPAN&gt;YearMonth = $::YearMonth part of the set analysis.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN&gt;Jaime.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 07:16:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637632#M732819</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-10-21T07:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Last year values in combined set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637693#M732820</link>
      <description>&lt;P&gt;Worked perfectly - thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 10:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-year-values-in-combined-set-analysis/m-p/1637693#M732820</guid>
      <dc:creator>Hoowling</dc:creator>
      <dc:date>2019-10-21T10:00:03Z</dc:date>
    </item>
  </channel>
</rss>

