<?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: Avg function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1649133#M48404</link>
    <description>&lt;P&gt;Here&amp;nbsp; you go:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enquiries:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;Date#(subfield(FileBaseName(),' ',7),'YYYY') as Year,&lt;BR /&gt;Date#(subfield(FileBaseName(),' ',6),'MMM') as Month,&lt;BR /&gt;Date#(subfield(FileBaseName(),' ',6)&amp;amp;' '&amp;amp;subfield(FileBaseName(),' ',7),'MMM YYYY') as MonthYear,&lt;/P&gt;&lt;P&gt;No.,&lt;BR /&gt;Description,&lt;BR /&gt;"Description 2",&lt;BR /&gt;Status,&lt;BR /&gt;"Last Amended",&lt;BR /&gt;"Global Dimension 1 Code" as "Branch",&lt;BR /&gt;"Enquiry Owner",&lt;BR /&gt;Surveyor,&lt;BR /&gt;"Enquiry Date",&lt;BR /&gt;"Survey Appointment",&lt;BR /&gt;"Survey Enquiry Status",&lt;BR /&gt;"Loss Reason Comment",&lt;BR /&gt;"Call Code",&lt;BR /&gt;"Symptom 1",&lt;BR /&gt;"Symptom 2",&lt;BR /&gt;"Symptom 3",&lt;BR /&gt;"Symptom 4",&lt;BR /&gt;("Survey Appointment"-"Enquiry Date") as "Days between Enquiry and Survey"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM [lib://Enquiry Extract/Enquiry Extract*.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [Book 1]) where not "Survey Appointment" like '';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Enquiries2:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;Year,&lt;BR /&gt;Month,&lt;BR /&gt;MonthYear,&lt;BR /&gt;No.,&lt;BR /&gt;Description,&lt;BR /&gt;"Description 2",&lt;BR /&gt;Status,&lt;BR /&gt;"Last Amended",&lt;BR /&gt;"Branch",&lt;BR /&gt;"Enquiry Owner",&lt;BR /&gt;Surveyor,&lt;BR /&gt;"Enquiry Date",&lt;BR /&gt;"Survey Appointment",&lt;BR /&gt;"Survey Enquiry Status",&lt;BR /&gt;"Loss Reason Comment",&lt;BR /&gt;"Call Code",&lt;BR /&gt;"Symptom 1",&lt;BR /&gt;"Symptom 2",&lt;BR /&gt;"Symptom 3",&lt;BR /&gt;"Symptom 4",&lt;BR /&gt;"Days between Enquiry and Survey",&lt;BR /&gt;Interval("Survey Appointment"-"Enquiry Date", 'DD') as Days&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//Avg("Days between Enquiry and Survey") as "Avg Days"&lt;BR /&gt;//if("Days between Enquiry and Survey"='&amp;gt;0',(Avg("Days between Enquiry and Survey")),'0') as "Average Days"&lt;BR /&gt;// avg("Days between Enquiry and Survey") as days&lt;/P&gt;&lt;P&gt;Resident Enquiries Group By Year,&lt;BR /&gt;Month,&lt;BR /&gt;MonthYear,&lt;BR /&gt;No.,&lt;BR /&gt;Description,&lt;BR /&gt;"Description 2",&lt;BR /&gt;Status,&lt;BR /&gt;"Last Amended",&lt;BR /&gt;"Branch",&lt;BR /&gt;"Enquiry Owner",&lt;BR /&gt;Surveyor,&lt;BR /&gt;"Enquiry Date",&lt;BR /&gt;"Survey Appointment",&lt;BR /&gt;"Survey Enquiry Status",&lt;BR /&gt;"Loss Reason Comment",&lt;BR /&gt;"Call Code",&lt;BR /&gt;"Symptom 1",&lt;BR /&gt;"Symptom 2",&lt;BR /&gt;"Symptom 3",&lt;BR /&gt;"Symptom 4",&lt;BR /&gt;"Days between Enquiry and Survey" ;&lt;BR /&gt;&lt;BR /&gt;drop table Enquiries&lt;/P&gt;</description>
    <pubDate>Wed, 20 Nov 2019 13:43:01 GMT</pubDate>
    <dc:creator>NemoAndStitch22</dc:creator>
    <dc:date>2019-11-20T13:43:01Z</dc:date>
    <item>
      <title>Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648350#M48316</link>
      <description>&lt;P&gt;Hiya,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a script and want to do the average days between enquiry and survey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've loaded in my data and created the metric of (Survey Date-Enquiry Date) as Days between survey and Enquiry&lt;/P&gt;&lt;P&gt;I've then noconcatenated this and loaded it again as a proper field.&lt;/P&gt;&lt;P&gt;Then tried to do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avg(Days between Enquiry and Survey) as Avg Days.&lt;/P&gt;&lt;P&gt;When I load this in it kicks up a fuss.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648350#M48316</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2024-11-16T19:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648398#M48319</link>
      <description>&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Interval(&lt;SPAN&gt;Survey Date-Enquiry Date, 'DD')) as Days&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648398#M48319</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-11-19T10:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648404#M48322</link>
      <description>&lt;P&gt;I'm getting the same error of 'invalid expression'&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:27:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648404#M48322</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2019-11-19T10:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648410#M48325</link>
      <description>&lt;P&gt;What this is returning?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Interval(Survey Date-Enquiry Date, 'DD')&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648410#M48325</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-11-19T10:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648416#M48326</link>
      <description>&lt;P&gt;That bit loads in fine and is giving me the correct data. as per the photo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="days.jpg" style="width: 420px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23927iC470B46A19DE49FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="days.jpg" alt="days.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648416#M48326</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2019-11-19T10:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648499#M48337</link>
      <description>&lt;P&gt;Aggregate functions such as Avg, Sum, Min, Max etc need group by clause... are you using one when you do Avg()?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 12:44:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648499#M48337</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-19T12:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648551#M48346</link>
      <description>&lt;P&gt;Sorry, I don't understand what you mean by a clause..&lt;/P&gt;&lt;P&gt;In my data load I tried doing this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resident Enquiries, group by Branch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(All formatted correctly) which it didn't like, is that what you mean?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648551#M48346</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2019-11-19T13:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648554#M48347</link>
      <description>&lt;P&gt;That is what I meant, but what all fields and expressions did you have within Load?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648554#M48347</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-19T13:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648558#M48348</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snip.jpg" style="width: 544px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23961iE7B4192C661BDC40/image-dimensions/544x404?v=v2" width="544" height="404" role="button" title="snip.jpg" alt="snip.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have tried, and the greyed out attempts didn't work with it like this.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:57:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648558#M48348</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2019-11-19T13:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648563#M48349</link>
      <description>&lt;P&gt;Group by needs to include all the fields that are listed outside of aggregation... so, Year,&amp;nbsp; Month, MonthYear etc will all need to go into Group By or you need to remove all fields except Brand from your Load...&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648563#M48349</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-19T14:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648572#M48350</link>
      <description>&lt;P&gt;It doesn't like that...The previously shared script before adding the group by was fine, and now it's not...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2019-11-19 140547.jpg" style="width: 587px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23965iA46D59D49A511A0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2019-11-19 140547.jpg" alt="Annotation 2019-11-19 140547.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.jpg" style="width: 522px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23966i7D3F2C2CAC2355A7/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.jpg" alt="11.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1648572#M48350</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2019-11-19T14:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1649130#M48401</link>
      <description>&lt;P&gt;Try to share full script of yours that shows Avg and Group By if u r trying in script?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 13:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1649130#M48401</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-11-20T13:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Avg function</title>
      <link>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1649133#M48404</link>
      <description>&lt;P&gt;Here&amp;nbsp; you go:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enquiries:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;Date#(subfield(FileBaseName(),' ',7),'YYYY') as Year,&lt;BR /&gt;Date#(subfield(FileBaseName(),' ',6),'MMM') as Month,&lt;BR /&gt;Date#(subfield(FileBaseName(),' ',6)&amp;amp;' '&amp;amp;subfield(FileBaseName(),' ',7),'MMM YYYY') as MonthYear,&lt;/P&gt;&lt;P&gt;No.,&lt;BR /&gt;Description,&lt;BR /&gt;"Description 2",&lt;BR /&gt;Status,&lt;BR /&gt;"Last Amended",&lt;BR /&gt;"Global Dimension 1 Code" as "Branch",&lt;BR /&gt;"Enquiry Owner",&lt;BR /&gt;Surveyor,&lt;BR /&gt;"Enquiry Date",&lt;BR /&gt;"Survey Appointment",&lt;BR /&gt;"Survey Enquiry Status",&lt;BR /&gt;"Loss Reason Comment",&lt;BR /&gt;"Call Code",&lt;BR /&gt;"Symptom 1",&lt;BR /&gt;"Symptom 2",&lt;BR /&gt;"Symptom 3",&lt;BR /&gt;"Symptom 4",&lt;BR /&gt;("Survey Appointment"-"Enquiry Date") as "Days between Enquiry and Survey"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM [lib://Enquiry Extract/Enquiry Extract*.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [Book 1]) where not "Survey Appointment" like '';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Enquiries2:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;Year,&lt;BR /&gt;Month,&lt;BR /&gt;MonthYear,&lt;BR /&gt;No.,&lt;BR /&gt;Description,&lt;BR /&gt;"Description 2",&lt;BR /&gt;Status,&lt;BR /&gt;"Last Amended",&lt;BR /&gt;"Branch",&lt;BR /&gt;"Enquiry Owner",&lt;BR /&gt;Surveyor,&lt;BR /&gt;"Enquiry Date",&lt;BR /&gt;"Survey Appointment",&lt;BR /&gt;"Survey Enquiry Status",&lt;BR /&gt;"Loss Reason Comment",&lt;BR /&gt;"Call Code",&lt;BR /&gt;"Symptom 1",&lt;BR /&gt;"Symptom 2",&lt;BR /&gt;"Symptom 3",&lt;BR /&gt;"Symptom 4",&lt;BR /&gt;"Days between Enquiry and Survey",&lt;BR /&gt;Interval("Survey Appointment"-"Enquiry Date", 'DD') as Days&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//Avg("Days between Enquiry and Survey") as "Avg Days"&lt;BR /&gt;//if("Days between Enquiry and Survey"='&amp;gt;0',(Avg("Days between Enquiry and Survey")),'0') as "Average Days"&lt;BR /&gt;// avg("Days between Enquiry and Survey") as days&lt;/P&gt;&lt;P&gt;Resident Enquiries Group By Year,&lt;BR /&gt;Month,&lt;BR /&gt;MonthYear,&lt;BR /&gt;No.,&lt;BR /&gt;Description,&lt;BR /&gt;"Description 2",&lt;BR /&gt;Status,&lt;BR /&gt;"Last Amended",&lt;BR /&gt;"Branch",&lt;BR /&gt;"Enquiry Owner",&lt;BR /&gt;Surveyor,&lt;BR /&gt;"Enquiry Date",&lt;BR /&gt;"Survey Appointment",&lt;BR /&gt;"Survey Enquiry Status",&lt;BR /&gt;"Loss Reason Comment",&lt;BR /&gt;"Call Code",&lt;BR /&gt;"Symptom 1",&lt;BR /&gt;"Symptom 2",&lt;BR /&gt;"Symptom 3",&lt;BR /&gt;"Symptom 4",&lt;BR /&gt;"Days between Enquiry and Survey" ;&lt;BR /&gt;&lt;BR /&gt;drop table Enquiries&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 13:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avg-function/m-p/1649133#M48404</guid>
      <dc:creator>NemoAndStitch22</dc:creator>
      <dc:date>2019-11-20T13:43:01Z</dc:date>
    </item>
  </channel>
</rss>

