<?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: Dollar sign expansions removes dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253796#M96165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Boris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had the same issue and unfortunately my list of expressions was huge. But they were grouped and that is how I needed to display them (Group 1, Group 2, Group 3...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have my Category Field that I use to select the group I want to display. So I added a trigger to this field, to populate the &lt;EM&gt;vMetrics&lt;/EM&gt; variable every time a new (and only one) value is selected, sorting them as well. Also,the first value on of pich() function is $1. So for example, my variable will be like this when I selected the Group1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick($1, Group1-Exp1, Group1-Exp-2, Group1-Exp3...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, on my chart table, my expression is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vMetrics(RowNo()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way I manage to reduce the number of expressions used on pick() function, and dynamically I could use the rowno() function to get the correct expression from the group I'm displaying. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps anyone who had the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2015 14:54:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-20T14:54:41Z</dc:date>
    <item>
      <title>Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253790#M96159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to display a straight table of calculations where each row displays a separate calculation. I loaded a table with the calculation name and expression. In the straight table, I have the name of calculation as the dimension and use the dollar-sign expansion, $(=field_name), on the expression to display the value. The problem seems that the dollar sign expansion ignores the dimension; I've added the maxstring function to test and it confirms that the dollar sign expansion does ignore the dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does any know if there's a problem with my approach or if there is a workaround (short of if statements in the expression)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a test qvw that shows the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 18:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253790#M96159</guid>
      <dc:creator />
      <dc:date>2011-08-05T18:56:09Z</dc:date>
    </item>
    <item>
      <title>Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253791#M96160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, I tried in the past to do a similar thing as you do now, however, I did not find a way to make qlikview evaluate correctly each formula according to each dimension change and I do not think it is possible. So, what I did is use a "pick match" type expression as the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick(match(Calculation,'add','divide','multiple','subtract'),'sum(a+b)', 'sum(a/b)','sum(a*b)','sum(a-b)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that the expressions are wrap in single quotes so qlikview renders them as string, if you actually want to evaluate the formula just remove the string. Also, the formulas can be stored in variables for reuse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 19:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253791#M96160</guid>
      <dc:creator />
      <dc:date>2011-08-05T19:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253792#M96161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct, dollar sign expansion is done outside of the context of your dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems there &lt;STRONG&gt;&lt;EM&gt;should&lt;/EM&gt;&lt;/STRONG&gt; be some way to force QlikView to evaluate the contents of the field as an expression without leaving the context of your dimensions.&amp;nbsp; For instance, it seems like the evaluate() function should be allowed in this context.&amp;nbsp; But that function is very specifically not supported in charts for some reason, so it doesn't work.&amp;nbsp; I've not found &lt;EM&gt;anything&lt;/EM&gt; that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The workaround I know is essentially the one Ivan mentions.&amp;nbsp; However, you CAN still use your current data model with the formulas stored in fields, and then generate the pick() from this data model.&amp;nbsp; You can also generate a calculation sequence number in the script to avoid needing to do the match() at presentation time.&amp;nbsp; See attached for an example of this approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: For people with personal edition, here's the relevant script.&amp;nbsp; Then you use Metric as a chart dimension, and $(vMetrics) as a chart expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Metric:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD recno() as MetricSequence,* INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Metric, Expression&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Count, count(Amount)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Max, max(Amount)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total, sum(Amount)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Metrics:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD concat(Expression,',',MetricSequence) as AllExpressions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Metric;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vMetrics = 'pick(MetricSequence,' &amp;amp; peek('AllExpressions') &amp;amp; ')';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLE Metrics;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 19:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253792#M96161</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-05T19:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253793#M96162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;This is my offer for you, pls to see image adjust&lt;/P&gt;&lt;P&gt;No to use apostrophe ¡&lt;/P&gt;&lt;P&gt;Good luck, Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 23:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253793#M96162</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2011-08-05T23:03:33Z</dc:date>
    </item>
    <item>
      <title>Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253794#M96163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestions. John's solution is a bit easier to add/remove rows and columns of expressions (the end result is larger matrix of calculations).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2011 00:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253794#M96163</guid>
      <dc:creator />
      <dc:date>2011-08-06T00:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253795#M96164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this post is an eye opener - i've been struggling with my expression for days. While it works when I manually select a dimension value, it would not work properly and would not pick up dimension values in expression. If you think about it though, I guess it makes sense because QV needs to know upfront the expression to use on a chart. pick/match does not work for me unfortunately because in my case it will 50000 characters expression &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 15:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253795#M96164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-03T15:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253796#M96165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Boris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had the same issue and unfortunately my list of expressions was huge. But they were grouped and that is how I needed to display them (Group 1, Group 2, Group 3...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have my Category Field that I use to select the group I want to display. So I added a trigger to this field, to populate the &lt;EM&gt;vMetrics&lt;/EM&gt; variable every time a new (and only one) value is selected, sorting them as well. Also,the first value on of pich() function is $1. So for example, my variable will be like this when I selected the Group1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick($1, Group1-Exp1, Group1-Exp-2, Group1-Exp3...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, on my chart table, my expression is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vMetrics(RowNo()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way I manage to reduce the number of expressions used on pick() function, and dynamically I could use the rowno() function to get the correct expression from the group I'm displaying. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps anyone who had the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 14:54:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253796#M96165</guid>
      <dc:creator />
      <dc:date>2015-08-20T14:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar sign expansions removes dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253797#M96166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;THX - took me days to find this solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 15:11:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dollar-sign-expansions-removes-dimensions/m-p/253797#M96166</guid>
      <dc:creator>qlikmeup</dc:creator>
      <dc:date>2017-05-18T15:11:11Z</dc:date>
    </item>
  </channel>
</rss>

