<?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 Can a function defined in Module be called as an expression in a table chart? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335489#M123707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Graham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can utilize variables - define function in a variable, and use this variable as expression.&amp;nbsp; It works fine if the expression is exactly the same in multiple charts.&lt;BR /&gt;If expression is using inputs as paramaters, I think it still can be done using variables, although not that straightforward.&amp;nbsp; I'll give it a try when have time...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2012 11:31:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-07T11:31:38Z</dc:date>
    <item>
      <title>Can a function defined in Module be called as an expression in a table chart?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335486#M123704</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;Here's my latest puzzle. I'm seeking to present KPI data in QV. In an existing Microsoft Access database query, a result is calculated (say, Nominator / Denominator) and a function call determines whether it meets a target - the result of the function call comes back as "P"ass or "F"ail.&amp;nbsp; For simplicity, I'll state the function as getPassFail(Result, Target1, Target2). In QV, I have the calculated result (Result) and the target values (Target1,Target2). It seems I can replicate the function in the code Module as vbscript. I'm uncertain however as to how or whether I can call this function in an expression in my table chart (where I want to show the outcome). As soon as I type getPassFail(Result, Target1, Target2) in the expression editor, I get a bad expression message in the expression editor and simply '-' in the chart. Please can someone advise, or point me towards a useful resource that explains how to get this to work please? Or if I'm making mis-assumptions or should be taking a different approach, please put me straight on the subject. Outdone by MS Access - surely not....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addendum: An example file might help illustrate perhaps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2012 16:46:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335486#M123704</guid>
      <dc:creator>graham-crooks</dc:creator>
      <dc:date>2012-03-04T16:46:01Z</dc:date>
    </item>
    <item>
      <title>Can a function defined in Module be called as an expression in a table chart?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335487#M123705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Graham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assumption is incorrect, sorry.&amp;nbsp; You cannot use custom module functions in the front-end objects, you can use them only in script.&lt;BR /&gt;You can use macros on front end.&amp;nbsp; Macro should be triggered by some event - selection, field change, button, etc.&lt;BR /&gt;I do not download attachemnts, so can't see what exactly the problem is.&amp;nbsp; I'm sure there are ways to address this.&amp;nbsp; Looks like all you need is the conditional expression (if).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2012 19:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335487#M123705</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-04T19:22:31Z</dc:date>
    </item>
    <item>
      <title>Can a function defined in Module be called as an expression in a table chart?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335488#M123706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael.&lt;/P&gt;&lt;P&gt;Thank you for this - at least I know now that I cannot have what I wanted here. As defining and using functions is a classic means of reducing code repetition and maintenance, it seems a shame this approach cannot be used in qlikview. The &lt;EM&gt;actual&lt;/EM&gt; 'if' statement in this case covers a wide range of possibilities, and therefore consumes quite a few lines of code - which now have to be replicated and maintained in each object individually - hardly classic efficiency. Hey ho.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 06:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335488#M123706</guid>
      <dc:creator>graham-crooks</dc:creator>
      <dc:date>2012-03-07T06:30:56Z</dc:date>
    </item>
    <item>
      <title>Can a function defined in Module be called as an expression in a table chart?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335489#M123707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Graham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can utilize variables - define function in a variable, and use this variable as expression.&amp;nbsp; It works fine if the expression is exactly the same in multiple charts.&lt;BR /&gt;If expression is using inputs as paramaters, I think it still can be done using variables, although not that straightforward.&amp;nbsp; I'll give it a try when have time...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 11:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335489#M123707</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-07T11:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can a function defined in Module be called as an expression in a table chart?</title>
      <link>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335490#M123708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;yes is possible.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Look this &lt;A _jive_internal="true" data-containerid="2049" data-containertype="14" data-objectid="4651" data-objecttype="102" href="https://community.qlik.com/docs/DOC-4651#comment-48395" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;https://community.qlik.com/docs/DOC-4651#comment-48395&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and look the attach.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Best regards&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Luca Jonathan Panetta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 15:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-a-function-defined-in-Module-be-called-as-an-expression-in-a/m-p/335490#M123708</guid>
      <dc:creator>pljsoftware</dc:creator>
      <dc:date>2016-08-04T15:38:20Z</dc:date>
    </item>
  </channel>
</rss>

