<?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 rollup expression in listbox? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-rollup-expression-in-listbox/m-p/458361#M570126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to persuade the list box to display an aggregate and a field something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(133) Asia&lt;/P&gt;&lt;P&gt;(76) Europe&lt;/P&gt;&lt;P&gt;(90) North America&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not found that magic expression that will make this happen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried two approaches: constructing a field that when evaluated will yield the desired value and using a variable with a parameter that will evaluate to the desired value: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable expression in list box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vDynaRollup((Place)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable defined as: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vDynaRollup = '('&amp;amp;Sum({$&amp;lt;Ancestor={$1}&amp;gt;}Count)&amp;amp;') '&amp;amp;$1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Evaluation of field in list box expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(=[Rollup])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example value of Rollup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Ancestor={'Argentina'}&amp;gt;}Count)&amp;amp;' Argentina'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either of these attempts results in a list box with no contents. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a second best attempt, I tried adding an expression evaluating either the variable or field to a list box displaying just a field and while it work (field values are displayed), the sum is always zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can a list box expression be used to display a rollup aggregate or am I SOL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(See attached for an example.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2012 08:13:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-02T08:13:37Z</dc:date>
    <item>
      <title>Dynamic rollup expression in listbox?</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-rollup-expression-in-listbox/m-p/458361#M570126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to persuade the list box to display an aggregate and a field something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(133) Asia&lt;/P&gt;&lt;P&gt;(76) Europe&lt;/P&gt;&lt;P&gt;(90) North America&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not found that magic expression that will make this happen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried two approaches: constructing a field that when evaluated will yield the desired value and using a variable with a parameter that will evaluate to the desired value: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable expression in list box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vDynaRollup((Place)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable defined as: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vDynaRollup = '('&amp;amp;Sum({$&amp;lt;Ancestor={$1}&amp;gt;}Count)&amp;amp;') '&amp;amp;$1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Evaluation of field in list box expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(=[Rollup])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example value of Rollup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Ancestor={'Argentina'}&amp;gt;}Count)&amp;amp;' Argentina'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either of these attempts results in a list box with no contents. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a second best attempt, I tried adding an expression evaluating either the variable or field to a list box displaying just a field and while it work (field values are displayed), the sum is always zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can a list box expression be used to display a rollup aggregate or am I SOL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(See attached for an example.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 08:13:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-rollup-expression-in-listbox/m-p/458361#M570126</guid>
      <dc:creator />
      <dc:date>2012-10-02T08:13:37Z</dc:date>
    </item>
  </channel>
</rss>

