<?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: Execute different expressions on a chart using macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052696#M920625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To use user-defined functions within qlikview objects you would need to enable them within the easter eggs - whereby those configurations aren't supported from qlik and are generally not recommended for using. And even with this won't be an eval() work then the result will be only a string for qlikview and not an expression and you would again need the $-sign expansion which couldn't be applied to get different results on row-level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the only solution is to create an expression-chain with if-loops respectively significantely easier to create and better performing a pick-nesting. It's not really a beginner-stuff but not too complicated for use and mostly it worked quite smoothly and performant - whereby it will be of course quite slow if you want to apply it on a very atomic level with huge amounts of data. But on this level it makes not much sense - really useful might it be on higher consolidated data. Therefore I suggest you followed the suggestions from Gysbert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For others to get a better impression about what we talk, see: &lt;A href="https://community.qlik.com/thread/215002"&gt;Dynamic expressions without Pick&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 May 2016 09:11:01 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-05-03T09:11:01Z</dc:date>
    <item>
      <title>Execute different expressions on a chart using macro</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052694#M920623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Been playing with this for a while as a workaround to the Pick function which doesn't scale at all with large volumes of data. This QVW works fine if I change the script to have $(v1) rather than v1. But works only for the non-aggregate functions. e.g. 2*2, 3*3 etc.&lt;/P&gt;&lt;P&gt;The moment I change to Sum(), it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I want is a simple model which will have something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Metric&amp;nbsp;&amp;nbsp; Exp1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exp2&lt;/P&gt;&lt;P&gt;M1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m1firstexp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m1secondexp&lt;/P&gt;&lt;P&gt;M2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m2firstexp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m2secondexp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the variables are defined like this.&lt;/P&gt;&lt;P&gt;m1firstexp&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; sum(value1)&lt;/P&gt;&lt;P&gt;m1secondexp -&amp;gt; sum(value2)&lt;/P&gt;&lt;P&gt;m2firstexp -&amp;gt; sum(value3)&lt;/P&gt;&lt;P&gt;m2secondexp -&amp;gt; sum(value4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As in the attached file, I want to use Metric as the dimension and dynamically evaluate the respective first and second expressions. Anyone has any ideas kindly let me know that will be of great help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S: Kindly avoid suggesting Pick. I have had enough of it. Sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052694#M920623</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Execute different expressions on a chart using macro</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052695#M920624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid your document doesn't make much sense to me. I don't quite understand what you're doing. But macro's are a bad idea. Macro's are generally very slow compared to the qlikview calculation engine. Using macro's can be great way to cause performance problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to be able to pick between expressions in a chart then there are better ways. First of all have a look at these blog posts:&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2014/12/how-not-to-choose-an-expression/" title="http://qlikviewcookbook.com/2014/12/how-not-to-choose-an-expression/"&gt;How Not to Choose an Expression | Qlikview Cookbook&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2014/12/how-to-choose-an-expression/" title="http://qlikviewcookbook.com/2014/12/how-to-choose-an-expression/"&gt;How to Choose an Expression | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now have a look at this document:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-6046"&gt;Customisable Straight (and Pivot) Tables - more food for thought&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 16:09:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052695#M920624</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-05-02T16:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Execute different expressions on a chart using macro</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052696#M920625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To use user-defined functions within qlikview objects you would need to enable them within the easter eggs - whereby those configurations aren't supported from qlik and are generally not recommended for using. And even with this won't be an eval() work then the result will be only a string for qlikview and not an expression and you would again need the $-sign expansion which couldn't be applied to get different results on row-level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the only solution is to create an expression-chain with if-loops respectively significantely easier to create and better performing a pick-nesting. It's not really a beginner-stuff but not too complicated for use and mostly it worked quite smoothly and performant - whereby it will be of course quite slow if you want to apply it on a very atomic level with huge amounts of data. But on this level it makes not much sense - really useful might it be on higher consolidated data. Therefore I suggest you followed the suggestions from Gysbert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For others to get a better impression about what we talk, see: &lt;A href="https://community.qlik.com/thread/215002"&gt;Dynamic expressions without Pick&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 09:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-different-expressions-on-a-chart-using-macro/m-p/1052696#M920625</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-05-03T09:11:01Z</dc:date>
    </item>
  </channel>
</rss>

