<?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: Using Variable in expression for Graph in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1552941#M743673</link>
    <description>&lt;P&gt;Your approach doesn't work because you are nesting aggregation-functions without an aggr() and this isn't valid.&lt;/P&gt;&lt;P&gt;To get it working it should rather look like:&lt;/P&gt;&lt;P&gt;&lt;I&gt;Sum({&amp;lt;[Zone]={'Zone 9-10'}&amp;gt;} aggr(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={&lt;STRONG&gt;"&amp;lt;=12"&lt;/STRONG&gt;}&amp;gt;}[Tijd])&lt;/I&gt;&lt;I&gt; / &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;OE_HfdCode&lt;/I&gt;&lt;I&gt;={'&lt;/I&gt;&lt;I&gt;TijdBenut&lt;/I&gt;&lt;I&gt;'}&amp;gt;}[&lt;/I&gt;&lt;I&gt;OE_Tijd&lt;/I&gt;&lt;I&gt;]) * 100,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $(=getcurrentfield('YourDimensionGroupName'))))&lt;BR /&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Here your redandant summing of the various VolgNr are shortened into a single calculation by adjusting the set analysis. The "&amp;lt;=12" might be extended with a &amp;gt;= or replaced with just a listing like 1,2,3, ... Further the needed dimension for the aggr is fetched from the used dimension-group. And the further set analysis is applied within the outer aggregation.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2019 12:34:26 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-03-06T12:34:26Z</dc:date>
    <item>
      <title>Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1552916#M743671</link>
      <description>&lt;P&gt;Currently I have the below graph based on a value in the table (TIJD)&lt;/P&gt;&lt;P&gt;I do however want to base it on a calculated value.&amp;nbsp; For this calculated value I created a Variable :&amp;nbsp; &lt;STRONG&gt;vTL&lt;/STRONG&gt;&lt;STRONG&gt;%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vTL&lt;/STRONG&gt;&lt;STRONG&gt;% : &lt;/STRONG&gt;&lt;I&gt;(((&lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={1}&amp;gt;}[Tijd]) + &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={2}&amp;gt;}[Tijd])+&lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={3}&amp;gt;}[Tijd]) + &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={4}&amp;gt;}[Tijd])+&lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={5}&amp;gt;}[Tijd]) + &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={6}&amp;gt;}[Tijd])+&lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={7}&amp;gt;}[Tijd])&lt;BR /&gt;&amp;nbsp;+ &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={8}&amp;gt;}[Tijd])+ &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={9}&amp;gt;}[Tijd]) + &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={10}&amp;gt;}[Tijd])+ &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={11}&amp;gt;}[Tijd]) + &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={12}&amp;gt;}[Tijd])) / &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;OE_HfdCode&lt;/I&gt;&lt;I&gt;={'&lt;/I&gt;&lt;I&gt;TijdBenut&lt;/I&gt;&lt;I&gt;'}&amp;gt;}[&lt;/I&gt;&lt;I&gt;OE_Tijd&lt;/I&gt;&lt;I&gt;]))) * 100 &lt;/I&gt;&lt;/P&gt;&lt;P&gt;Putting this in the default expresion does not work &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sum({&amp;lt;[Zone]={'Zone 9-10'}&amp;gt;} &lt;STRONG&gt;&lt;I&gt;$(&lt;/I&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;I&gt;vTL&lt;/I&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;I&gt;%)&lt;/I&gt;&lt;/STRONG&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;How must I setup my expression to make this work?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV-01.jpg" style="width: 773px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7363i8C82A30A5EA0AFB0/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV-01.jpg" alt="QV-01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1552916#M743671</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2024-11-16T04:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1552941#M743673</link>
      <description>&lt;P&gt;Your approach doesn't work because you are nesting aggregation-functions without an aggr() and this isn't valid.&lt;/P&gt;&lt;P&gt;To get it working it should rather look like:&lt;/P&gt;&lt;P&gt;&lt;I&gt;Sum({&amp;lt;[Zone]={'Zone 9-10'}&amp;gt;} aggr(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={&lt;STRONG&gt;"&amp;lt;=12"&lt;/STRONG&gt;}&amp;gt;}[Tijd])&lt;/I&gt;&lt;I&gt; / &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;OE_HfdCode&lt;/I&gt;&lt;I&gt;={'&lt;/I&gt;&lt;I&gt;TijdBenut&lt;/I&gt;&lt;I&gt;'}&amp;gt;}[&lt;/I&gt;&lt;I&gt;OE_Tijd&lt;/I&gt;&lt;I&gt;]) * 100,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; $(=getcurrentfield('YourDimensionGroupName'))))&lt;BR /&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Here your redandant summing of the various VolgNr are shortened into a single calculation by adjusting the set analysis. The "&amp;lt;=12" might be extended with a &amp;gt;= or replaced with just a listing like 1,2,3, ... Further the needed dimension for the aggr is fetched from the used dimension-group. And the further set analysis is applied within the outer aggregation.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 12:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1552941#M743673</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-06T12:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553042#M743674</link>
      <description>&lt;P&gt;I changed the expression as you proposed. Still no graph.&lt;/P&gt;&lt;P&gt;I first changed it to a single calculation. That worked well.&lt;/P&gt;&lt;P&gt;Then with the aggr(.............&amp;nbsp; Still no graph.&lt;/P&gt;&lt;P&gt;What's missing?&lt;/P&gt;&lt;PRE&gt;Sum({&amp;lt;[Zone]={'Zone 9-10'}&amp;gt;} aggr(
Sum({&amp;lt;VolgNr ={"&amp;lt;=12"}&amp;gt;}[Tijd]) / Sum({&amp;lt;OE_HfdCode={'TijdBenut'}&amp;gt;}[OE_Tijd]) * 100,
$(=GetCurrentField([Periode-QCDM]))))&lt;/PRE&gt;&lt;P&gt;The GroupName is equal to the one mentioned in 'Demensions'&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV-01.jpg" style="width: 648px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7380i9A0E0F079D5BFD06/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV-01.jpg" alt="QV-01.jpg" /&gt;&lt;/span&gt;section&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 15:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553042#M743674</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2019-03-06T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553078#M743675</link>
      <description>&lt;P&gt;The dimension-group isn't treated as a classical field and needs therefore no [] brackets for itself else just type it without brackets or any quotes and ignore any syntax highlightning errors on it, but the whole construct must be wrapped with brackets if the belonging fields have some special chars or spaces. This means it should be look like:&lt;/P&gt;&lt;PRE&gt;[$(=GetCurrentField(Periode-QCDM))]&lt;/PRE&gt;&lt;P&gt;If it's don't work switch your group on the&amp;nbsp;Year-Month field and replace the getcurrentfield() with it - to check if the main-logic worked.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 15:52:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553078#M743675</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-06T15:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553141#M743677</link>
      <description>&lt;P&gt;Marcus many thanks for your input so far. Unfortunately I didn't succeed yet.&lt;/P&gt;&lt;P&gt;I Think I tried what you proposed me to do.&lt;/P&gt;&lt;P&gt;Hope I give you enough information to give it another try&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.qlik.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV-02.jpg" style="width: 648px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7400iD185A236728C5BE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV-02.jpg" alt="QV-02.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 17:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553141#M743677</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2019-03-06T17:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553371#M743678</link>
      <description>&lt;P&gt;If you don't use the dimension-group within the chart you mustn't use getcurrentfield() else just the field like:&lt;/P&gt;&lt;P&gt;&lt;I&gt;Sum({&amp;lt;[Zone]={'Zone 9-10'}&amp;gt;} aggr(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;VolgNr&lt;/I&gt;&lt;I&gt; ={"&amp;lt;=12"}&amp;gt;}[Tijd])&lt;/I&gt;&lt;I&gt; / &lt;/I&gt;&lt;I&gt;Sum&lt;/I&gt;&lt;I&gt;({&amp;lt;&lt;/I&gt;&lt;I&gt;OE_HfdCode&lt;/I&gt;&lt;I&gt;={'&lt;/I&gt;&lt;I&gt;TijdBenut&lt;/I&gt;&lt;I&gt;'}&amp;gt;}[&lt;/I&gt;&lt;I&gt;OE_Tijd&lt;/I&gt;&lt;I&gt;]) * 100,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/FONT&gt;))&lt;/I&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 08:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553371#M743678</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-07T08:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553423#M743680</link>
      <description>&lt;P&gt;That did it&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.qlik.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;Why however does the graph still show the same data in each graph despite the different Zone in the expression.&lt;/P&gt;&lt;P&gt;What I want is a worksheet with 5 graphs for each zone &lt;SPAN&gt;simultaneously&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV-03.jpg" style="width: 980px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7452i2B8583C0A35EF8F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV-03.jpg" alt="QV-03.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 09:29:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553423#M743680</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2019-03-07T09:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553463#M743682</link>
      <description>&lt;P&gt;Are you sure that the values behind it are really different? Especially in regard to the association of the field Zone?&lt;/P&gt;&lt;P&gt;Another point could be the 1 as set modifier within you first chart.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 10:12:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553463#M743682</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-07T10:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553479#M743684</link>
      <description>&lt;P&gt;Yes the values are different.&amp;nbsp; It's now showing the avarage of all selection Zone's and it's value changes with a change of Zone.&lt;/P&gt;&lt;P&gt;Leaving the '1 ' doesn't change anything.&amp;nbsp; Using '$-1' and then selecting only Zone 1-2, results in an empty graph, as it should with this Set Modifier.&amp;nbsp; With '1' as Set Modifier it should only show the selected criteria (as mentioned in the HELP file).&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 10:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553479#M743684</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2019-03-07T10:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553520#M743685</link>
      <description>&lt;P&gt;Without knowing your data and the datamodel it's difficult to say what's wrong respectively different to the expectation.&lt;/P&gt;&lt;P&gt;But I think you will find the cause of your equal results with a bit playing with the expressions, for example by changing the Zone value to the another ones or just leaving it completely or maybe transfering it from the outer aggregation to the inner aggregation.&lt;BR /&gt;Further helpful is often not to use a graphically chart else a table chart and applying there several expressions in parallel and/or adding a few more dimensions. There should be occur some hint of what is happening.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 11:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553520#M743685</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-07T11:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable in expression for Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553555#M743686</link>
      <description>&lt;P&gt;I'll follow your advice.&lt;/P&gt;&lt;P&gt;Thanks for helping so far.&lt;/P&gt;&lt;P&gt;Jan Droog&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 12:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-in-expression-for-Graph/m-p/1553555#M743686</guid>
      <dc:creator>Reliability-Engineer</dc:creator>
      <dc:date>2019-03-07T12:17:39Z</dc:date>
    </item>
  </channel>
</rss>

