<?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: Weighted accuracy calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255616#M866494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; The expression works as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2016 21:32:05 GMT</pubDate>
    <dc:creator>sangeess21</dc:creator>
    <dc:date>2016-12-14T21:32:05Z</dc:date>
    <item>
      <title>Weighted accuracy calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255612#M866490</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 working on Weighted accuracy and I'm stuck at this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;The rolled up formula for weighted accuracy is correct. The error was on each individual item when you sum it up by product classification. But the problem is the weights are not applied at the lowest level, they are assigned only at the second level in hierarchy. Rollup formula is 1-((error/demand)*weight) and the formula for individual weighted accuracy calculation is (1-(error/demand))*weight.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;The hierarchy is (Low to high):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Item&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Fcst Product Classification - Weights are assigned at this level&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Item Group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Category &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Model &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Division&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;Company&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;The expression works fine if Fcst Product classification is selected under dimensions. But it does not return any result when "Fcst product classification" is not selected. How do I get the weighted accuracy even when Fcst Product Classification is not selected under dimensions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG __jive_id="146525" alt="Image1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146525_Image1.JPG" style="height: 291px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG __jive_id="146526" alt="Image2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/146526_Image2.JPG" style="height: 272px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'helvetica neue', helvetica, arial, 'lucida grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sangeetha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255612#M866490</guid>
      <dc:creator>sangeess21</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted accuracy calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255613#M866491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the part which is the issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Dimensionality() = 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Flag_Type=&amp;gt;}Aggr((Sum({&amp;lt;Flag_Type=&amp;gt;}Aggr(fabs(Sum(FORECAST_QTY)-Sum({&amp;lt;Flag_Type=&amp;gt;}Demand)),Item)))/Sum({&amp;lt;Flag_Type=&amp;gt;}Demand)*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Pick(Match(only({&amp;lt;Flag_Type=&amp;gt;}[Fcst Product Classification]), 'High Revenue', 'Commodity', 'High Growth Potential', 'EOS Pending', 'Build to Order', 'Legacy') + 1, 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; $(vHighRevenue), $(vCommodity), $(vHighGrowthPotential), $(vEOSPending), $(vBuildToOrder), $(vLegacy)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Fcst Product Classification])),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if( not SubStringCount(Concat('"'&amp;amp;_dimension&amp;amp;'"', '|'), '"Fcst Product Classification"'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(1 -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Flag_Type=&amp;gt;}Aggr(((Sum({&amp;lt;Flag_Type=&amp;gt;}Aggr(fabs(Sum(FORECAST_QTY)-Sum({&amp;lt;Flag_Type=&amp;gt;}Demand)),Item)))/Sum({&amp;lt;Flag_Type=&amp;gt;}Demand)),$(=Concat(DISTINCT '[' &amp;amp; _DIM &amp;amp; ']', ', ')&amp;amp;',[Fcst Product Classification]'))))*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Pick(Match(only({&amp;lt;Flag_Type=&amp;gt;}[Fcst Product Classification]), 'High Revenue', 'Commodity', 'High Growth Potential', 'EOS Pending', 'Build to Order', 'Legacy') + 1, 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; $(vHighRevenue), $(vCommodity), $(vHighGrowthPotential), $(vEOSPending), $(vBuildToOrder), $(vLegacy)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(1 -Sum({&amp;lt;Flag_Type=&amp;gt;}Aggr(((Sum({&amp;lt;Flag_Type=&amp;gt;}Aggr(fabs(Sum(FORECAST_QTY)-Sum({&amp;lt;Flag_Type=&amp;gt;}Demand)),Item)))/Sum({&amp;lt;Flag_Type=&amp;gt;}Demand)),$(=Concat(DISTINCT '[' &amp;amp; _DIM &amp;amp; ']', ', ')))))*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;Pick(Match(only({&amp;lt;Flag_Type=&amp;gt;}[Fcst Product Classification]), 'High Revenue', 'Commodity', 'High Growth Potential', 'EOS Pending', 'Build to Order', 'Legacy') + 1, 0,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; $(vHighRevenue), $(vCommodity), $(vHighGrowthPotential), $(vEOSPending), $(vBuildToOrder), $(vLegacy))&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess what are your expected output when you have only Division as a dimension?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 17:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255613#M866491</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-13T17:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted accuracy calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255614#M866492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want weighted accuracy to return results on all possible dimension selections. The above expression works only when Fcst Product Classification is selected in addition to other dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 17:31:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255614#M866492</guid>
      <dc:creator>sangeess21</dc:creator>
      <dc:date>2016-12-13T17:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted accuracy calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255615#M866493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but can you check the attached. It would be helpful if I knew what are the numbers that you expect to see.... but I guess this will help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 17:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255615#M866493</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-13T17:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted accuracy calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255616#M866494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; The expression works as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 21:32:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-accuracy-calculation/m-p/1255616#M866494</guid>
      <dc:creator>sangeess21</dc:creator>
      <dc:date>2016-12-14T21:32:05Z</dc:date>
    </item>
  </channel>
</rss>

