<?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 Using a field's value as reference to another field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241664#M92057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Hi,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;You just have to create a variable called for example v_kpi which value is =only(KPI), then in your chart you can use as expression the value sum(&lt;B&gt;&lt;I&gt;$(v_kpi)&lt;/I&gt;&lt;/B&gt;) . When you select "Revenue" as your kpi the value of the variable will be sum(Revenue) and the chart will show these values, if you select qty the chart will be updated with the sum of the quantities. Is that what you were asking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2011 10:50:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-08T10:50:27Z</dc:date>
    <item>
      <title>Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241661#M92054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I have an independent table that defines KPIs like Qty, Revenue or whatever. I am looking for a way to dynamically calculate the KPIs in a Pivot/Table. I use the KPI values (not connected to the data model itself!) as dimension. Now I want a simple dynamic expression which makes a sum(Qty) for the Qty line, a sum(Revenue) for the Revenue line and so on. Sample data structure is below and any hint or solution is highly welcome.&lt;/P&gt;&lt;P&gt;KPIs:&lt;/P&gt;&lt;P&gt;LOAD * INLINE[&lt;/P&gt;&lt;P&gt;KPI&lt;/P&gt;&lt;P&gt;Qty&lt;/P&gt;&lt;P&gt;Revenue&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Country&lt;/P&gt;&lt;P&gt;Product&lt;/P&gt;&lt;P&gt;Qty&lt;/P&gt;&lt;P&gt;Revenue&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 10:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241661#M92054</guid>
      <dc:creator />
      <dc:date>2011-03-08T10:25:57Z</dc:date>
    </item>
    <item>
      <title>Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241662#M92055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;possibly this :&lt;/P&gt;&lt;P&gt;define a variable &lt;STRONG&gt;Vexpression=KPI&lt;/STRONG&gt; and then the expression like &lt;STRONG&gt;Sum($(Vexpression))&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;not tried.&lt;/P&gt;&lt;P&gt;Regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 10:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241662#M92055</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-03-08T10:46:31Z</dc:date>
    </item>
    <item>
      <title>Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241663#M92056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Florian,&lt;/P&gt;&lt;P&gt;Asusming the folllowing piece of script based on yours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;KPIs:LOAD * INLINE [KPI, ExpressionQty, Sum(Qty)Revenue, Sum(Revenue)]; Data:LOAD Repeat(Chr(64 + Ceil(Rand() * 15)), 2) AS Country, 'Item' &amp;amp; Repeat(Chr(64 + Ceil(Rand() * 15)), 3) AS Product, Ceil(Rand() * 1000) AS Qty, Ceil(Rand() * 100) AS RevenueAUTOGENERATE 20;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now create a Listbox with field KPI, select one value and in the Listbox properties, check "Alway one value selected" and a new Pivot Chart, set Product as dimension (or Country) and the following as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;$(=Only(KPI))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can set a condition calculation so if there's no KPI value selected, the chart is not rendered.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 10:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241663#M92056</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-08T10:46:53Z</dc:date>
    </item>
    <item>
      <title>Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241664#M92057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Hi,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;You just have to create a variable called for example v_kpi which value is =only(KPI), then in your chart you can use as expression the value sum(&lt;B&gt;&lt;I&gt;$(v_kpi)&lt;/I&gt;&lt;/B&gt;) . When you select "Revenue" as your kpi the value of the variable will be sum(Revenue) and the chart will show these values, if you select qty the chart will be updated with the sum of the quantities. Is that what you were asking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 10:50:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241664#M92057</guid>
      <dc:creator />
      <dc:date>2011-03-08T10:50:27Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241665#M92058</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;you all have basically the same approach, but the returned value remains 0 or NULL depending on the used syntax. Furthermore my challenge is, that these KPIs are not exchangable, but need to be shown all at the same time. I just thought it would be easer to work with such a reference instead of having multiple objects and calculations to maintain...&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 11:11:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241665#M92058</guid>
      <dc:creator />
      <dc:date>2011-03-08T11:11:08Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241666#M92059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Attached is a working copy of this approach.&lt;/P&gt;&lt;P&gt;If they need to be shown all at the same time, and they do not depend on the user selections, then why you don just use the corresponding expressions in the chart?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 11:15:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241666#M92059</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-08T11:15:55Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241667#M92060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;your example works because you used product as dimension, but I need to have the different KPIs as dimension instead.&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 11:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241667#M92060</guid>
      <dc:creator />
      <dc:date>2011-03-08T11:21:51Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241668#M92061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;So if I understand you right, then you will need to use the Aggr() function to get those expressions as dimensions. You can add that Aggr() to the KPI INLINE table, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Qty, Aggr(Sum(Qty), Product)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Apologies if this is not what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 11:35:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241668#M92061</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-08T11:35:25Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241669#M92062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Hi, not sure to understand what you want, but it sounds like cross table, is that something like that that you are expecting ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/2046.Untitled.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/2046.Untitled.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 11:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241669#M92062</guid>
      <dc:creator />
      <dc:date>2011-03-08T11:42:40Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: Using a field's value as reference to another field</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241670#M92063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Miguel,&lt;/P&gt;&lt;P&gt;didn't work out in my particular example as basically the dimension to aggregate over would change in my use case. However, thank you very much for your efforts.&lt;/P&gt;&lt;P&gt;@Renaud,&lt;/P&gt;&lt;P&gt;not exactly, as I won't use product and country in my visualization at all.&lt;/P&gt;&lt;P&gt;@All,&lt;/P&gt;&lt;P&gt;I solved it through some nested IF statements. It doesn't look nice and takes some performance, but luckily my application is small enough to handle it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 11:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-s-value-as-reference-to-another-field/m-p/241670#M92063</guid>
      <dc:creator />
      <dc:date>2011-03-08T11:57:43Z</dc:date>
    </item>
  </channel>
</rss>

