<?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: Create a new Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106250#M908480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you attach your script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel del Valle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2016 08:44:22 GMT</pubDate>
    <dc:creator>migueldelval</dc:creator>
    <dc:date>2016-06-14T08:44:22Z</dc:date>
    <item>
      <title>Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106249#M908479</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 would like to create a new function that I can use to display in a statistics box. Basically the function would do this equation:&lt;/P&gt;&lt;P&gt;(Total No. Hours) x (Hourly Rate) = Total Service Pay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying this lines on the script but can't seem to make it work.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum([# of Hours]) as TotalHours&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum([# of Hours])*[Hourly Rate] as TotalServicePay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess making a function is better. So I can display it on a statistics box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="127742" alt="forums.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/127742_forums.PNG" style="height: auto;" /&gt;&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/Create-a-new-Function/m-p/1106249#M908479</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106250#M908480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you attach your script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel del Valle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106250#M908480</guid>
      <dc:creator>migueldelval</dc:creator>
      <dc:date>2016-06-14T08:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106251#M908481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use Aggregation functions in script you need Group By clause in the load statement, can you share your script code to understand and also share what problem you are facing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106251#M908481</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2016-06-14T08:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106252#M908482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hi, if you do this on your script?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;([# of Hours])*[Hourly Rate] as TotalServicePay&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106252#M908482</guid>
      <dc:creator>syukyo_zhu</dc:creator>
      <dc:date>2016-06-14T08:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106253#M908483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We really need to see the whole load statement to understand where the problem lies...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106253#M908483</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2016-06-14T08:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106254#M908484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this - &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Load&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;A, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(B) as B1, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(C) as C1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;from&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; test.qvd &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff6600;"&gt;group by&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt; A,D&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106254#M908484</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2016-06-14T08:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106255#M908485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ps. An immediate issue is that you are not aggregating the 'Hourly rate' field... you need to multiply before the sum (adding dimensions etc. in group by clause and load)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;sum(Pay) as Total Pay&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;[# of Hours]*[Hourly Rate] as Pay&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 08:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106255#M908485</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2016-06-14T08:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106256#M908486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. Attached is here is the script. I was trying to add these lines at the end of the script. Not sure if I'm doing it right. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataResults:&lt;/P&gt;&lt;P&gt;LOAD [# of Hours]&lt;/P&gt;&lt;P&gt;Sum([# of Hours]) as TotalHours,&lt;/P&gt;&lt;P&gt;Sum([TotalHours])*[Hourly Rate] as TotalServicePay;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 09:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106256#M908486</guid>
      <dc:creator />
      <dc:date>2016-06-14T09:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106257#M908487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;Try this on the Statistics Box&lt;/P&gt;&lt;P&gt;Sum(Aggr(Sum([# of Hours]*[Hourly Rate]),[Personnel Name]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 09:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106257#M908487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-14T09:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106258#M908488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! It worked. Aggr( ) did the job.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 09:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106258#M908488</guid>
      <dc:creator />
      <dc:date>2016-06-14T09:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106259#M908489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;This is not right:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You are not calling a table.&lt;/LI&gt;&lt;LI&gt;Your files are not on the same table.&lt;/LI&gt;&lt;LI&gt;You ar not doing a group by to accumulate values.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with my other response you will have the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 10:40:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106259#M908489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-14T10:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Function</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106260#M908490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're wellcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 10:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-new-Function/m-p/1106260#M908490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-14T10:40:29Z</dc:date>
    </item>
  </channel>
</rss>

