<?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 Help in set analysis current selection and last year (with current selection) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-in-set-analysis-current-selection-and-last-year-with/m-p/1389837#M422739</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello in attached qvw file&lt;/P&gt;&lt;P&gt;I got w variables:&lt;/P&gt;&lt;P&gt;vBudget_Forecast&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;vBudget_Forecast_LY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first variable is intended to calculate the the Forecast in selection and is giving correct result&lt;/P&gt;&lt;P&gt;the second variable is intended to calculate the forecast for previous year (while selecting current year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vBudget_Forecast (2016) is giving a value that is different from vBudget_Forecast_LY for(2017)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first variable is as follows:&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;aggr&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;isnull($(vAvg_Selling_Price_KG))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;$(vAvg_Selling_Price_KG)&amp;lt; 0.5 * $(vPriceList_KG)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;$(vAvg_Selling_Price_KG)&amp;gt; 1.5 * $(vPriceList_KG)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;$(vPriceList_KG)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;$(vAvg_Selling_Price_KG)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;$(vSalesQty_Forecast_KG)&lt;/P&gt;&lt;P&gt;,account_company_key,MONTH_YEAR,customer_key,product_key,account_row_id&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the second variable I created variables with the same name but added &lt;STRONG&gt;_LY&lt;/STRONG&gt; (last year)&lt;BR /&gt;the problem is in the &lt;STRONG&gt;vPriceList_KG &lt;/STRONG&gt;and &lt;STRONG&gt;vPriceList_KG_LY &lt;/STRONG&gt;I'm assuming&lt;/P&gt;&lt;P&gt;cause the other variables are giving correct result when switching between Years in selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;this is urgent for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Aug 2017 13:26:49 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2017-08-11T13:26:49Z</dc:date>
    <item>
      <title>Help in set analysis current selection and last year (with current selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-set-analysis-current-selection-and-last-year-with/m-p/1389837#M422739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello in attached qvw file&lt;/P&gt;&lt;P&gt;I got w variables:&lt;/P&gt;&lt;P&gt;vBudget_Forecast&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;vBudget_Forecast_LY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first variable is intended to calculate the the Forecast in selection and is giving correct result&lt;/P&gt;&lt;P&gt;the second variable is intended to calculate the forecast for previous year (while selecting current year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vBudget_Forecast (2016) is giving a value that is different from vBudget_Forecast_LY for(2017)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first variable is as follows:&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;aggr&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;isnull($(vAvg_Selling_Price_KG))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;$(vAvg_Selling_Price_KG)&amp;lt; 0.5 * $(vPriceList_KG)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;$(vAvg_Selling_Price_KG)&amp;gt; 1.5 * $(vPriceList_KG)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;$(vPriceList_KG)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;$(vAvg_Selling_Price_KG)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;$(vSalesQty_Forecast_KG)&lt;/P&gt;&lt;P&gt;,account_company_key,MONTH_YEAR,customer_key,product_key,account_row_id&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the second variable I created variables with the same name but added &lt;STRONG&gt;_LY&lt;/STRONG&gt; (last year)&lt;BR /&gt;the problem is in the &lt;STRONG&gt;vPriceList_KG &lt;/STRONG&gt;and &lt;STRONG&gt;vPriceList_KG_LY &lt;/STRONG&gt;I'm assuming&lt;/P&gt;&lt;P&gt;cause the other variables are giving correct result when switching between Years in selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;this is urgent for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 13:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-set-analysis-current-selection-and-last-year-with/m-p/1389837#M422739</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2017-08-11T13:26:49Z</dc:date>
    </item>
  </channel>
</rss>

