<?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 Dynamic measures from dimension values. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-measures-from-dimension-values/m-p/1943384#M77737</link>
    <description>&lt;P&gt;Hi, I'm stuck a bit with searching a 'workaround': I have multiple KPIs per employee per period and I want to represent that in straight table (or pivot), something like this (with much longer period and more KPIs):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="justISO_0-1655209217014.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81705i2E1342C545CFC2AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="justISO_0-1655209217014.png" alt="justISO_0-1655209217014.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm searching easier, dynamic way to represent KPIs per period, and avoid writing formula for each months column like&lt;/P&gt;
&lt;P&gt;aggr(sum(if(period= Max(total period)), sales)), emp) , same formula, but for minus one month, 2 months and so on..&lt;/P&gt;
&lt;P&gt;So I'm started from far away and thinking, maybe it is possible to load dimensions, which name will represent measure name I want to calculate in the first place:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;temp:
load * inline [
emp, period, sales, customer, score, impact
emp1,2022-05-01, 10, 1, 111, 7
emp2,2022-04-01, 20, 2, 222, 8
emp3,2022-03-01, 30, 3, 333, 9 ];

measure:
load * inline [
measure
sales
customer
score
impact];
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and define this [measure] dimension to be used as measure name and dynamically calculate each value. I experimented with various combinations and only managed to get working this line ( =$(='sum(' &amp;amp; measure &amp;amp; ')') ) :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="justISO_1-1655210451669.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81712i895921982E32EAE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="justISO_1-1655210451669.png" alt="justISO_1-1655210451669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;but only if I select one [measure] value. Is it possible somehow to force expression to think that [measure] value is measure field it needs to calculate?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 12:47:14 GMT</pubDate>
    <dc:creator>justISO</dc:creator>
    <dc:date>2022-06-14T12:47:14Z</dc:date>
    <item>
      <title>Dynamic measures from dimension values.</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-measures-from-dimension-values/m-p/1943384#M77737</link>
      <description>&lt;P&gt;Hi, I'm stuck a bit with searching a 'workaround': I have multiple KPIs per employee per period and I want to represent that in straight table (or pivot), something like this (with much longer period and more KPIs):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="justISO_0-1655209217014.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81705i2E1342C545CFC2AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="justISO_0-1655209217014.png" alt="justISO_0-1655209217014.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm searching easier, dynamic way to represent KPIs per period, and avoid writing formula for each months column like&lt;/P&gt;
&lt;P&gt;aggr(sum(if(period= Max(total period)), sales)), emp) , same formula, but for minus one month, 2 months and so on..&lt;/P&gt;
&lt;P&gt;So I'm started from far away and thinking, maybe it is possible to load dimensions, which name will represent measure name I want to calculate in the first place:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;temp:
load * inline [
emp, period, sales, customer, score, impact
emp1,2022-05-01, 10, 1, 111, 7
emp2,2022-04-01, 20, 2, 222, 8
emp3,2022-03-01, 30, 3, 333, 9 ];

measure:
load * inline [
measure
sales
customer
score
impact];
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and define this [measure] dimension to be used as measure name and dynamically calculate each value. I experimented with various combinations and only managed to get working this line ( =$(='sum(' &amp;amp; measure &amp;amp; ')') ) :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="justISO_1-1655210451669.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81712i895921982E32EAE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="justISO_1-1655210451669.png" alt="justISO_1-1655210451669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;but only if I select one [measure] value. Is it possible somehow to force expression to think that [measure] value is measure field it needs to calculate?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 12:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-measures-from-dimension-values/m-p/1943384#M77737</guid>
      <dc:creator>justISO</dc:creator>
      <dc:date>2022-06-14T12:47:14Z</dc:date>
    </item>
  </channel>
</rss>

