<?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 Defining expressions to re-use across different objects? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144134#M23174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could define a variable with the text of the expression, and then substitue the variable wherever the expression is needed.&lt;/P&gt;&lt;P&gt;For example, Let SalesVar='Sum(Sales)'. then in the chart, you could use $(SalesVar) in place of Sum(Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2009 19:16:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-05-14T19:16:44Z</dc:date>
    <item>
      <title>Defining expressions to re-use across different objects?</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144133#M23173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;It is time consuming an confusing to have to re-write every expression when creating a new object. Is there a better way? I know that you can re-use expressions within the same object, or copy and paste them across objects, but what about defining an expression, giving it a name and using it by that name in different objects?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Hasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 18:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144133#M23173</guid>
      <dc:creator />
      <dc:date>2009-05-14T18:44:35Z</dc:date>
    </item>
    <item>
      <title>Defining expressions to re-use across different objects?</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144134#M23174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could define a variable with the text of the expression, and then substitue the variable wherever the expression is needed.&lt;/P&gt;&lt;P&gt;For example, Let SalesVar='Sum(Sales)'. then in the chart, you could use $(SalesVar) in place of Sum(Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 19:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144134#M23174</guid>
      <dc:creator />
      <dc:date>2009-05-14T19:16:44Z</dc:date>
    </item>
    <item>
      <title>Defining expressions to re-use across different objects?</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144135#M23175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I put all my commonly used expressions at the top of the script so they are all together and easy to review.&lt;/P&gt;&lt;P&gt;Create them using SET and these then get written out as variables on reload. As Vidyut says, you can then reference the contents using $(varname)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 21:07:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144135#M23175</guid>
      <dc:creator />
      <dc:date>2009-05-14T21:07:16Z</dc:date>
    </item>
    <item>
      <title>Defining expressions to re-use across different objects?</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144136#M23176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great tip gentlemen!&lt;/P&gt;&lt;P&gt;I can't believe I haven't been utilizing this. My current project seems to use the same formulas over and over and I've been retyping them each time.&lt;/P&gt;&lt;P&gt;A variable can also be used to define a reusable Set Analysis expression. I am using a lot of flags, so all of my formulas seem to contain {&amp;lt;Flag={1}&amp;gt;}. You can set up a variable vFlag = '{&amp;lt;Flag={1}&amp;gt;}'. Then in each formula, you can use Sum($(vFlag) Field) in place of Sum({&amp;lt;Flag={1}&amp;gt;} Field). In this example, it's not that much shorter, but with longer Set Analysis expressions, it could be a great time saver. If nothing else, it will reduce the number of curly brackets I have to type!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 21:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144136#M23176</guid>
      <dc:creator />
      <dc:date>2009-05-14T21:38:19Z</dc:date>
    </item>
    <item>
      <title>Defining expressions to re-use across different objects?</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144137#M23177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's exactly what I was looking for, thanks a lot! &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 21:52:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144137#M23177</guid>
      <dc:creator />
      <dc:date>2009-05-14T21:52:02Z</dc:date>
    </item>
    <item>
      <title>Defining expressions to re-use across different objects?</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144138#M23178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this topic. really useable for maintenance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Oct 2010 18:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-expressions-to-re-use-across-different-objects/m-p/144138#M23178</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-10-31T18:51:28Z</dc:date>
    </item>
  </channel>
</rss>

