<?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 Use Dynamic Formulas from Inline Table in Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157304#M32837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can achieve something similar, not exactly what you want, using the pick in your expression. You will have to type all the formulas in the expression though.&lt;/P&gt;&lt;P&gt;Suppose you load your dimension with a number as well, so we can pick the right formula afterwards:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD dual(SR_Item, SR_num) as SR_Item&lt;/P&gt;&lt;P&gt;INLINE&lt;/P&gt;&lt;P&gt;[SR_Item, SR_num&lt;/P&gt;&lt;P&gt;Kontakte gemäß Händlerselektion,&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;Geschäft nicht mehr existent,&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;Nicht realisierte Kontakte, 3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your object expression, you can do a:&lt;/P&gt;&lt;P&gt;&amp;nbsp; = pick(SR_Item, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'count(distinct{...)',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'count(distinct{...)',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'count(distinct{...)', )&lt;/P&gt;&lt;P&gt;It will pick the right formula depending on the SR_Item in the dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2011 12:36:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-06-23T12:36:36Z</dc:date>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157299#M32832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;i have a problem using dynamic formulas in a pivot table. (Qlikview 10)&lt;BR /&gt;I load the formulas in this way:&lt;BR /&gt;&lt;BR /&gt;Standardreport:&lt;BR /&gt;LOAD * INLINE [SR_Item, SR_ItemFormula&lt;BR /&gt;Kontakte gemäß Händlerselektion, 'count(distinct{...)'&lt;BR /&gt;Geschäft nicht mehr existent, 'count(distinct{...)'&lt;BR /&gt;Nicht realisierte Kontakte, 'count(distinct{...)'&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;The formulas a included and are different for each row in the pivot table.&lt;BR /&gt;&lt;BR /&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3221_sourceID:3221" /&gt;&lt;BR /&gt;&lt;BR /&gt;I insert SR_Item as Dimension and SR_ItemFormula as formula.&lt;BR /&gt;&lt;BR /&gt;My problem:&lt;BR /&gt;Column Anzahl: =$(=SR_ItemFormula) is only working, when one formula is selected, otherwise there is a - sign.&lt;BR /&gt;Column Anzahl2: SR_ItemFormula: Qlikview is showing my formula as text, but is not calculating with it.&lt;BR /&gt;&lt;BR /&gt;How to get work? Thanks for you help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 12:34:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157299#M32832</guid>
      <dc:creator />
      <dc:date>2011-01-06T12:34:54Z</dc:date>
    </item>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157300#M32833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, did you try $(SR_ItemFormula) instead in the expression editor?&lt;/P&gt;&lt;P&gt;The problem of the null ( - ), is only because you are not selecting anything, so the value of the expression is NULL, maybe you can try a maxstring() or minstring() function but as always, it depends about your model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 13:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157300#M32833</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-06T13:40:01Z</dc:date>
    </item>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157301#M32834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hector,&lt;/P&gt;&lt;P&gt;thanks for your fast answer. I tried $(SR_ItemFormula), but that is not working (like =$(=SR_ItemFormula)).&lt;BR /&gt;I am not sure if Qlikview is able to handle different formulas in one expression.&lt;BR /&gt;&lt;BR /&gt;Regards, Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 14:17:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157301#M32834</guid>
      <dc:creator />
      <dc:date>2011-01-06T14:17:26Z</dc:date>
    </item>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157302#M32835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, qlikview can manage dynamic expression, the problem is you need to choose just one at the time&lt;/P&gt;&lt;P&gt;check this little test file, maybe it will help you&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;PS. For some reason, i'm unable to upload files with the .qvw extension, please rename the png for .qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 14:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157302#M32835</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-06T14:32:52Z</dc:date>
    </item>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157303#M32836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first thanks for the time you spended for helping me.&lt;BR /&gt;The example file will not solve my problem - it is like you said: The problem is, that you need to choose one formula at the time.&lt;BR /&gt;&lt;BR /&gt;In my case this means that qlikview is calculating all rows with the same (maxstring) formula.&lt;BR /&gt;But i need a different formula for each row, otherwise the result is wrong &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Perhaps it is possible to use dynamical dimensions and to implement the formulas from the inline table in these?&lt;BR /&gt;&lt;BR /&gt;Regard, Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 16:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157303#M32836</guid>
      <dc:creator />
      <dc:date>2011-01-06T16:18:19Z</dc:date>
    </item>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157304#M32837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can achieve something similar, not exactly what you want, using the pick in your expression. You will have to type all the formulas in the expression though.&lt;/P&gt;&lt;P&gt;Suppose you load your dimension with a number as well, so we can pick the right formula afterwards:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD dual(SR_Item, SR_num) as SR_Item&lt;/P&gt;&lt;P&gt;INLINE&lt;/P&gt;&lt;P&gt;[SR_Item, SR_num&lt;/P&gt;&lt;P&gt;Kontakte gemäß Händlerselektion,&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;Geschäft nicht mehr existent,&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;Nicht realisierte Kontakte, 3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your object expression, you can do a:&lt;/P&gt;&lt;P&gt;&amp;nbsp; = pick(SR_Item, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'count(distinct{...)',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'count(distinct{...)',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'count(distinct{...)', )&lt;/P&gt;&lt;P&gt;It will pick the right formula depending on the SR_Item in the dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 12:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157304#M32837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-23T12:36:36Z</dc:date>
    </item>
    <item>
      <title>Use Dynamic Formulas from Inline Table in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157305#M32838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dj-kalle, Nicolai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicolai is on the right track, but with a few minor issues:&lt;/P&gt;&lt;P&gt;- Use the 'SR_num' column in the pick() function; pick() expects a numeric value as its first parameter. (Update: just noticed that Nicolai uses dual() to stuff the number from 'SR_num' into the SR_Item field...)&lt;/P&gt;&lt;P&gt;- Don't put quotes around the various 'count(distinct ...)' functions, otherwise the result you'll get will be the formula text, instead of the value you want to calculate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And ofcourse it's easier / more compact to use dollarsign expansion and the concat() function to generate the list of 'count()' alternatives. You'll end up with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=pick(SR_num, $(=concat(SR_ItemFormula, ',', SR_num)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which will evaluate to something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=pick(SR_num, count({set_1} fields), count(...), ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the various count() functions coming from the SR_ItemFormula field.&lt;/P&gt;&lt;P&gt;I'm passing the 'SR_num' field as an extra parameter to concat(), otherwise the SR_ItemFormula values might get sorted in the wrong order and you'd get the calculations mixed up (look up the 'sort weight' parameter for concat() in the QlikView help to see what I'm talking about).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 11:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Dynamic-Formulas-from-Inline-Table-in-Pivot-Table/m-p/157305#M32838</guid>
      <dc:creator />
      <dc:date>2011-12-20T11:33:12Z</dc:date>
    </item>
  </channel>
</rss>

