<?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: Pivot Table Static Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131479#M371877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not 100% sure what the final requirement needs to be, but can you check if this meets your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({1}Total&amp;lt;Month_Week&amp;gt;ZUnits_Sold) &lt;SPAN style="color: #ff0000;"&gt;* Avg(1)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Jul 2016 23:22:09 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-07-23T23:22:09Z</dc:date>
    <item>
      <title>Pivot Table Static Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131478#M371876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the following table in which I am calculating accuracy for my forecast values against actuals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Demand Planning Vodafone QV_SS1.png" class="jive-image image-1" src="/legacyfs/online/132287_Demand Planning Vodafone QV_SS1.png" style="height: 321px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The accuracy is calculated for each week and the formula for accuracy requires me to have the total sales of all products for that week:&lt;/P&gt;&lt;P&gt;Accuracy=&lt;/P&gt;&lt;P&gt;if(Actual&amp;lt;0,0,ALT(1-(fabs(Forecast-Actual)/(If(Forecast &amp;gt;Actual,Forecast&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,Actual))),0))* (Actual/Total_R1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;where Total_R1 is the sum of sales of all producs for that particular week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total_R1=sum(Total&amp;lt;Month_Week&amp;gt;ZUnits_Sold)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem 1: &lt;/STRONG&gt;The problem with above formula is that whenever I filter my pivot table data, the value of &lt;SPAN style="font-size: 13.3333px;"&gt;Total_R1 changes accordingly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;however, I want it to remain constant for the accuracy to be correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So modified the formula as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Modified Formula:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Total_R1=&lt;/SPAN&gt;sum({1}Total&amp;lt;Month_Week&amp;gt;ZUnits_Sold)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem 2: &lt;/STRONG&gt;By modifying the formula this way, any selections I make in the corresponding filters or even the pivot table elements are ignore i&lt;STRONG&gt;.e. &lt;/STRONG&gt;data is not filtered. For eg. even if I change the product name, the list of products displayed the the pivot table still remains the same and is shows all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the Total_R1 value to remain constant ant also pivot table to respond to selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest a work around.&lt;/P&gt;&lt;P&gt;Request you to refer the attached qvw file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jul 2016 18:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131478#M371876</guid>
      <dc:creator />
      <dc:date>2016-07-23T18:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table Static Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131479#M371877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not 100% sure what the final requirement needs to be, but can you check if this meets your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({1}Total&amp;lt;Month_Week&amp;gt;ZUnits_Sold) &lt;SPAN style="color: #ff0000;"&gt;* Avg(1)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jul 2016 23:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131479#M371877</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-23T23:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table Static Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131480#M371878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Sunny T.&lt;/P&gt;&lt;P&gt;The qvw provided by you is still working the same as my original one.&lt;/P&gt;&lt;P&gt;The accuracy values i get with your formula as well are correct, however due to the identifier {1} is the formula for &lt;/P&gt;&lt;P&gt;Total_R1, the data is not getting filtered for any list box selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the data to be filtered and respond to list box selection.&lt;/P&gt;&lt;P&gt;For a better picture, you can remove the {1} as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Total_R1=&lt;/SPAN&gt;Sum(Total&amp;lt;Month_Week&amp;gt;ZUnits_Sold) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;* Avg(1)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;in your formula and see how the data responds to filter selections as against your with the {1} set identifier.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Hope my requirement is clearer now. Request you to please suggest a way.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jul 2016 15:28:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131480#M371878</guid>
      <dc:creator />
      <dc:date>2016-07-24T15:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table Static Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131481#M371879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/132303_Capture.PNG" style="height: 215px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why it is behaving the way it is, but when multiplied with Avg({$}1) for all four expression, the chart seems to work the way you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jul 2016 21:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131481#M371879</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-24T21:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table Static Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131482#M371880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny T,&lt;/P&gt;&lt;P&gt;It seems to work so.&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;Could you please explain the logic, not able to figure out this particular case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tejas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 04:34:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131482#M371880</guid>
      <dc:creator />
      <dc:date>2016-07-25T04:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table Static Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131483#M371881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like I said, I am not sure why it is behaving the way it is behaving, but my guess is that the expressions getting pivoted might be causing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you got what you wanted, I would suggest closing the thread by marking correct and helpful responses.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 12:37:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-Static-Expression/m-p/1131483#M371881</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-25T12:37:30Z</dc:date>
    </item>
  </channel>
</rss>

