<?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: A different formula for each table cell in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/A-different-formula-for-each-table-cell/m-p/759854#M270359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a quick additional question: provided that we find the way to efficiently select the right formula for the right cell, the table still has to perform a different calculation for each of these cells; does this mean that performance can't really be optimized?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Nov 2014 11:09:08 GMT</pubDate>
    <dc:creator>googel84</dc:creator>
    <dc:date>2014-11-04T11:09:08Z</dc:date>
    <item>
      <title>A different formula for each table cell</title>
      <link>https://community.qlik.com/t5/QlikView/A-different-formula-for-each-table-cell/m-p/759853#M270358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, I am facing a quite challenging issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have to display 70 KPIsin a single sheet and each of them is (almost always) split across 4 columns (LYTD, YTD, Target, Target vs YTD), i.e. there roughly are 280 actual KPIs ! To be more explicit, the expected result is a table made of 70 rows and 6 columns (2 dimensions - &lt;EM&gt;KPI group&lt;/EM&gt; and &lt;EM&gt;KPI&lt;/EM&gt; - and 4 expressions). &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This means that, each table &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; text-decoration: underline;"&gt;cell&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; has to evaluate a different formula based on its row and column. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We managed to organize all the formulas in a single Excel file whose structure is very close to the one of the expected pivot table and where each KPI is identified by a code (&lt;EM&gt;RTA measure index&lt;/EM&gt;). I have attached a revised copy of this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After many trials and errors, I have reached the result by using for each expression a very similar formula based on &lt;EM&gt;pick&lt;/EM&gt; and &lt;EM&gt;fieldvalue&lt;/EM&gt; (instead of &lt;EM&gt;if&lt;/EM&gt; and &lt;EM&gt;fieldvalue&lt;/EM&gt;), but the performance is considered poor... (30 s on a 2.4 GHz dual core, 12 GB, dedicated machine).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;pick(&amp;nbsp; [RTA_FORMULE.RTA measure index],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; num($(=fieldvalue('RTA_FORMULE.RTA measure formula 2',1)),'$(vRTAMeasureAAA_F_2)'),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; num($(=fieldvalue('RTA_FORMULE.RTA measure formula 2',2)),'$(vRTAMeasureAAB_F_2)'),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; num($(=fieldvalue('RTA_FORMULE.RTA measure formula 2',3)),'$(vRTAMeasureAAC_F_2)'),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; num($(=fieldvalue('RTA_FORMULE.RTA measure formula 2',4)),'$(vRTAMeasureAAD_F_2)'),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ...&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; num($(=fieldvalue('RTA_FORMULE.RTA measure formula 2',70)),'$(vRTAMeasureACR_F_2)'),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What could be used in order to speed up the performance in this scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have actually tried a few things such as using dynamically created variables to host each of the 280 formulas and I was actually able to place in each cell the right variable name but I haven't been able to proceed with the next step, i.e. interpreting variables' content as a formula and evaluate it to get the right numbers. Enable the last expression to see what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look to the attached qvw. Sorry for its size, but the original file could not be easily filtered and then scrambling made it even bigger..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-different-formula-for-each-table-cell/m-p/759853#M270358</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2014-11-03T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: A different formula for each table cell</title>
      <link>https://community.qlik.com/t5/QlikView/A-different-formula-for-each-table-cell/m-p/759854#M270359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a quick additional question: provided that we find the way to efficiently select the right formula for the right cell, the table still has to perform a different calculation for each of these cells; does this mean that performance can't really be optimized?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 11:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-different-formula-for-each-table-cell/m-p/759854#M270359</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2014-11-04T11:09:08Z</dc:date>
    </item>
  </channel>
</rss>

