<?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: Creating YTD average starting from 01/01/2016 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254951#M866673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Gysbert. I notice you answer a lot of questions on Qlik community. I am going to assume you are quite knowledgeable of its use. I, on the other hand, am a newbie. Sorry if I ask stupid questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My field for the scrap if titled "weight". I have created a combo bar/line graph. I have "week" as my dimension, and sum(weight) as my first expression, and I am trying to display the YTD average with my second expression (line). I have tried your suggestion as: rangeavg(above(sum(weight),0,rowno())). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not produce any line on the graph. Should I be inputting something in the parenthesis after "rowno"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I would include my Qlikview file so you could see it but have not figured out how to do this yet. I am using the free personal version of Qlikview so maybe it is not an option for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have entered some code for Mastercalendar and then for a As-of Calendar (code I found on forum from HIC). Could I accomplish my goal using this method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QuartersMap:&amp;nbsp; &lt;/P&gt;&lt;P&gt;MAPPING LOAD&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;rowno() as Month,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil (rowno()/3) as Quarter&amp;nbsp; &lt;/P&gt;&lt;P&gt;AUTOGENERATE (12);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Temp:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; min(C) as minDate,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; max(C) as maxDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident InjectionScrap;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let varMinDate = Num(MakeDate(2015,12,30));&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&amp;nbsp; &lt;/P&gt;&lt;P&gt;DROP Table Temp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;TempCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMinDate) + Iterno()-1 As Num,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Date($(varMinDate) + IterNo() - 1) as TempDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;MasterCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; TempDate As C,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; week(TempDate) As Week,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) As Year,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Month(TempDate) As Month,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Day(TempDate) As Day,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; WeekDay(TempDate) as WeekDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MonthStart(TempDate), 'YYYY MMM') as Month1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident TempCalendar&amp;nbsp; &lt;/P&gt;&lt;P&gt;Order By TempDate ASC;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Drop Table TempCalendar; &lt;/P&gt;&lt;P&gt;tmpAsOfCalendar:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; distinct Month1&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident MasterCalendar ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ======== Cartesian product with itself ========&lt;/P&gt;&lt;P&gt;Join (tmpAsOfCalendar)&lt;/P&gt;&lt;P&gt;Load Month1 as AsOfMonth&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident tmpAsOfCalendar ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ======== Reload, filter and calculate additional fields ========&lt;/P&gt;&lt;P&gt;[As-Of Calendar]:&lt;/P&gt;&lt;P&gt;Load Month1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; AsOfMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Round((AsOfMonth-Month1)*12/365.2425) as MonthDiff,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(AsOfMonth)-Year(Month1) as YearDiff&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident tmpAsOfCalendar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where AsOfMonth &amp;gt;= Month1;&lt;/P&gt;&lt;P&gt;Drop Table tmpAsOfCalendar; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2016 06:34:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-12-14T06:34:24Z</dc:date>
    <item>
      <title>Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254949#M866671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have data of scrap as a percentage (x kilos of scrap/ z kilos of product) for each week of 2016. I have created a bar chart to display this data. I would like to add a line for YTD average. So for week 1 it will equal week 1, for week 2 it will be (week 1 + week 2)/2,&lt;/P&gt;&lt;P&gt;then (week 1+week2+week3)/3, and so on. How can I do this?&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/Creating-YTD-average-starting-from-01-01-2016/m-p/1254949#M866671</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254950#M866672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps with and expression like this: rangeavg(above(sum(scrap),0, rowno()))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 12:49:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254950#M866672</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-13T12:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254951#M866673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Gysbert. I notice you answer a lot of questions on Qlik community. I am going to assume you are quite knowledgeable of its use. I, on the other hand, am a newbie. Sorry if I ask stupid questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My field for the scrap if titled "weight". I have created a combo bar/line graph. I have "week" as my dimension, and sum(weight) as my first expression, and I am trying to display the YTD average with my second expression (line). I have tried your suggestion as: rangeavg(above(sum(weight),0,rowno())). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not produce any line on the graph. Should I be inputting something in the parenthesis after "rowno"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I would include my Qlikview file so you could see it but have not figured out how to do this yet. I am using the free personal version of Qlikview so maybe it is not an option for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have entered some code for Mastercalendar and then for a As-of Calendar (code I found on forum from HIC). Could I accomplish my goal using this method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QuartersMap:&amp;nbsp; &lt;/P&gt;&lt;P&gt;MAPPING LOAD&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;rowno() as Month,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil (rowno()/3) as Quarter&amp;nbsp; &lt;/P&gt;&lt;P&gt;AUTOGENERATE (12);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Temp:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; min(C) as minDate,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; max(C) as maxDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident InjectionScrap;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let varMinDate = Num(MakeDate(2015,12,30));&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&amp;nbsp; &lt;/P&gt;&lt;P&gt;DROP Table Temp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;TempCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMinDate) + Iterno()-1 As Num,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Date($(varMinDate) + IterNo() - 1) as TempDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;MasterCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; TempDate As C,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; week(TempDate) As Week,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(TempDate) As Year,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Month(TempDate) As Month,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Day(TempDate) As Day,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; WeekDay(TempDate) as WeekDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MonthStart(TempDate), 'YYYY MMM') as Month1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident TempCalendar&amp;nbsp; &lt;/P&gt;&lt;P&gt;Order By TempDate ASC;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Drop Table TempCalendar; &lt;/P&gt;&lt;P&gt;tmpAsOfCalendar:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; distinct Month1&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident MasterCalendar ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ======== Cartesian product with itself ========&lt;/P&gt;&lt;P&gt;Join (tmpAsOfCalendar)&lt;/P&gt;&lt;P&gt;Load Month1 as AsOfMonth&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident tmpAsOfCalendar ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ======== Reload, filter and calculate additional fields ========&lt;/P&gt;&lt;P&gt;[As-Of Calendar]:&lt;/P&gt;&lt;P&gt;Load Month1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; AsOfMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Round((AsOfMonth-Month1)*12/365.2425) as MonthDiff,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(AsOfMonth)-Year(Month1) as YearDiff&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident tmpAsOfCalendar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where AsOfMonth &amp;gt;= Month1;&lt;/P&gt;&lt;P&gt;Drop Table tmpAsOfCalendar; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 06:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254951#M866673</guid>
      <dc:creator />
      <dc:date>2016-12-14T06:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254952#M866674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;This did not produce any line on the graph. Should I be inputting something in the parenthesis after "rowno"?&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Probably not. It depends on how many dimensions are involved. Feel free to check the help file: &lt;A href="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/ChartFunctions/InterRecordFunctions/rowno.htm" title="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/ChartFunctions/InterRecordFunctions/rowno.htm"&gt;RowNo ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I would include my Qlikview file so you could see it but have not figured out how to do this yet.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;See this document: &lt;A href="https://community.qlik.com/docs/DOC-16454"&gt;Uploading a Sample&lt;/A&gt;‌. Even if you won't be able to open the document after I modify it, it will at least allow us to see what the data model is and what you're trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I have entered some code for Mastercalendar and then for a As-of Calendar (code I found on forum from HIC). Could I accomplish my goal using this method?&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, an AsOf table sounds like a good solution for this. But the script for the As-Of table you posted is based on months, not weeks. You'd have to change that so it uses weeks as unit instead of months. Or perhaps days is even better. &lt;SPAN style="font-size: 13.3333px;"&gt;Also I don't see any relation with any date or week field from the rest of your data model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact let's use the &lt;A href="https://github.com/RobWunderlich/Qlikview-Components/releases/tag/v11.1"&gt;Qlik Components library&lt;/A&gt; to create the AsOf table. Download the &lt;A href="https://github.com/RobWunderlich/Qlikview-Components/releases/download/v11.1/qvc-11.1.zip" title="https://github.com/RobWunderlich/Qlikview-Components/releases/download/v11.1/qvc-11.1.zip"&gt;qvc-11.1.zip&lt;/A&gt;‌ and extract it. Then look in the Examples directory and open AsOfTable.qvw example. At least I hope those still can be opened by QV PE as well. You'll need three lines to create an AsOf table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Must_Include=&lt;STRONG&gt;..\qvc_runtime\qvc.qvs&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;CALL Qvc.AsOfTable('&lt;STRONG&gt;YourDateFieldHere&lt;/STRONG&gt;');&lt;/P&gt;&lt;P&gt;CALL Qvc.Cleanup;&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;&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;Make sure to change the path to the qvc.qvs file so it points to where you installed it on your file system and replace YourDateFieldHere with the field name of the date field in your model. If you only have a week and a year field then first create a date field using the MakeWeekDate() function.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 07:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254952#M866674</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-14T07:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254953#M866675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached my Qlikview file for your reference. This is as it was when I asked the question. I have not tried changing it with your suggestions yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 07:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254953#M866675</guid>
      <dc:creator />
      <dc:date>2016-12-14T07:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254954#M866676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see an attachment yet. &lt;SPAN style="font-size: 13.3333px;"&gt;It's possibly a small bug in the jive software that sometimes keeps attachments hidden.&lt;/SPAN&gt; Can you edit your post again and remove and re-add it? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 07:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254954#M866676</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-14T07:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254955#M866677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried to attached again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 07:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254955#M866677</guid>
      <dc:creator />
      <dc:date>2016-12-14T07:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254956#M866678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, create your WeekYear like this in your master calendar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dual(Week(TempDate)&amp;nbsp; &amp;amp; '-' &amp;amp; WeekYear(TempDate) , Weekstart(TempDate)) as WeekYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then replace the last part of your script with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ======== Cartesian product with itself ========&lt;/P&gt;&lt;P&gt;Join (tmpAsOfCalendar)&lt;/P&gt;&lt;P&gt;Load DISTINCT WeekYear as AsOfWeek&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident tmpAsOfCalendar ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ======== Reload, filter and calculate additional fields ========&lt;/P&gt;&lt;P&gt;[As-Of Calendar]:&lt;/P&gt;&lt;P&gt;Load WeekYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp; AsOfWeek,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor((AsOfWeek-WeekYear)/7) as WeekDiff,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Round((AsOfWeek-WeekYear)*12/365.2425) as MonthDiff,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year(AsOfWeek)-Year(WeekYear) as YearDiff&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident tmpAsOfCalendar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where AsOfWeek &amp;gt;= WeekYear;&lt;/P&gt;&lt;P&gt;Drop Table tmpAsOfCalendar; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then use AsOfWeek as dimension in your chart and as expression sum({$&amp;lt;YearDiff={0}&amp;gt;} Weight) / count(distinct {$&amp;lt;YearDiff={0}&amp;gt;} WeekYear)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 08:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254956#M866678</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-14T08:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254957#M866679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done as you suggested. Some success. However my bar chart is not correct now. Not sure if the issue is with the expression or something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 09:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254957#M866679</guid>
      <dc:creator />
      <dc:date>2016-12-14T09:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254958#M866680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably want the first expression to be sum({$&amp;lt;WeekDiff={0}&amp;gt;} Weight) so it shows the sum of Weight of that week only, not the YTD average.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 09:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254958#M866680</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-14T09:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254959#M866681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sweet as. Thanks for your help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions for learning Qlikview? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best &lt;/P&gt;&lt;P&gt;Terry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 10:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254959#M866681</guid>
      <dc:creator />
      <dc:date>2016-12-14T10:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating YTD average starting from 01/01/2016</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254960#M866682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See &lt;A href="https://community.qlik.com/docs/DOC-8764"&gt;How to become a QlikView Developer?&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;There are more good books that you could read to learn more: &lt;A href="https://community.qlik.com/docs/DOC-8898"&gt;Books and literature&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 11:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-YTD-average-starting-from-01-01-2016/m-p/1254960#M866682</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-14T11:06:43Z</dc:date>
    </item>
  </channel>
</rss>

