<?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: Cost Index calculation problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308253#M497894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing if you may.&lt;/P&gt;&lt;P&gt;I want to view the changes in the cost index by Yearly quarters but it's acting little funny when I do it.&lt;/P&gt;&lt;P&gt;Is it the set analysis or the aggr that is interfering?&lt;/P&gt;&lt;P&gt;Please find attached the improved example.&lt;/P&gt;&lt;P&gt;I really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2011 15:31:57 GMT</pubDate>
    <dc:creator>eliran</dc:creator>
    <dc:date>2011-08-30T15:31:57Z</dc:date>
    <item>
      <title>Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308248#M497889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm intrested in calculate cost index for products.&lt;/P&gt;&lt;P&gt;The forumla is pretty simple, &lt;/P&gt;&lt;P&gt;X=avg price 2011 * qty 2011&lt;/P&gt;&lt;P&gt;Y=avg price 2010 * qty 2011&lt;/P&gt;&lt;P&gt;Cost Index=(X-Y)/X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is as following, If the quantities are equal to 0 (In 2010 or 2011), I don't want it in my caluclation.&lt;/P&gt;&lt;P&gt;The calculation should be dynamic when changing the selected years, so Set analysis will be used.&lt;/P&gt;&lt;P&gt;Another thing, because it's dynamic I can't think of a flag I can use (In the load script) with the set analysis.&lt;/P&gt;&lt;P&gt;Any help will be welcomed.&lt;/P&gt;&lt;P&gt;Attached is a sample of my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 17:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308248#M497889</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2011-08-29T17:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308249#M497890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eliran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please have a look at attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replaced the fixed years in set analysis with get the max(year) resp max(year)-1 from the selection and checking with an if()-clause if sum(qty) is larger than zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see, the entries with missing qty are removed from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 19:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308249#M497890</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-29T19:03:57Z</dc:date>
    </item>
    <item>
      <title>Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308250#M497891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, thanks for your help.&lt;/P&gt;&lt;P&gt;Second, My main problem is the calculation itself more then the presentation of it in the table (altought it's important).&lt;/P&gt;&lt;P&gt;If you can see in the attached file you sent, sum of column X isnt equal to the sum of rows.&lt;/P&gt;&lt;P&gt;That's because the calculation doesn't refer to the condition you inserted in the column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on that issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 06:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308250#M497891</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2011-08-30T06:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308251#M497892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eliran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry for that, I thought that expression total would be doing the job, but here I was totally wrong (because I checked a sum of Qty &amp;gt; zero which then always true in a complete table with all / many products and takes all values again into acount).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Change expression total to sum of rows for X/Y column&lt;/P&gt;&lt;P&gt;- changed index calculation column to an advanced aggregation&lt;/P&gt;&lt;P&gt;- check in Excel, that calculations are correct on row level and in total&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:15:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308251#M497892</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-30T10:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308252#M497893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't thank you enough.. &lt;/P&gt;&lt;P&gt;The solution worked perfectly!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 10:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308252#M497893</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2011-08-30T10:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308253#M497894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing if you may.&lt;/P&gt;&lt;P&gt;I want to view the changes in the cost index by Yearly quarters but it's acting little funny when I do it.&lt;/P&gt;&lt;P&gt;Is it the set analysis or the aggr that is interfering?&lt;/P&gt;&lt;P&gt;Please find attached the improved example.&lt;/P&gt;&lt;P&gt;I really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 15:31:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308253#M497894</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2011-08-30T15:31:57Z</dc:date>
    </item>
    <item>
      <title>Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308254#M497895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eliran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a quick look, but don't find a problem yet. What do you mean with acting little funny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added again the two columns for X / Y sums and temporarily also product as second dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sums seems ok to me, also the cost index calculation ( I double checked in Excel).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that in your sample, the total cost index is not the average of the quartely indices. The cost index is always based on the sums X/Y which widely vary over time, so there is a weigh we have to take care of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you point me to the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 23:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308254#M497895</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-30T23:22:19Z</dc:date>
    </item>
    <item>
      <title>Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308255#M497896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I'm looking at the Cost Index of 2011-Q1, When the year is checked I get -7.52%, if I remove the selections from the Year dimnesion, I get for the same quarter -54.79%.&lt;/P&gt;&lt;P&gt;It's acting even funier in my real DB where I miss out quarters when not selecting a specific year while viewing the data by Yearly Quarters. For example, 2010-q3,2009-q3,2009-q4, 2008-q4.&lt;/P&gt;&lt;P&gt;Now, 2008 I can blame with lack of data because it's the first year with data in my DB, but it still shows cost index for 2008 quarters which is very bizzare.&lt;/P&gt;&lt;P&gt;Same goes for the example, 2008 quarters calculations shouldnt be shown at all, since there is no data for 2007.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eliran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 14:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308255#M497896</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2011-08-31T14:30:39Z</dc:date>
    </item>
    <item>
      <title>Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308256#M497897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you want also the check for missing Qty to be quarter based now, also the year-to-year cost index now based on quarterly Sales and Qty?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need to have a closer look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 15:44:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308256#M497897</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-31T15:44:00Z</dc:date>
    </item>
    <item>
      <title>Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308257#M497898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly..&lt;/P&gt;&lt;P&gt;I'm sorry for not making it clear from the start.&lt;/P&gt;&lt;P&gt;I assumed it will be ok when viewing it this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really apperciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 07:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308257#M497898</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2011-09-01T07:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cost Index calculation problem</title>
      <link>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308258#M497899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eliran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope attached comes close to what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having a dimension of type Date makes it difficult to use Dates in the set expression (because the dimension will not be taken into account in the set expression).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I created a aggregation table for the avg Prices per product and YearQuarter (only for the periods where the Qty was &amp;gt; 0).&lt;/P&gt;&lt;P&gt;Calculation the cost index is easy then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks ok to me now, please have a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 14:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cost-Index-calculation-problem/m-p/308258#M497899</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-02T14:31:03Z</dc:date>
    </item>
  </channel>
</rss>

