<?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: Line Graph, put 0s where no data present for activity date? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610479#M679934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working to implement this now and will let you know how it goes.&amp;nbsp; Thanks!&amp;nbsp; (I'll switch from helpful to correct answer for you after I can confirm and let the community know if I come across some loose-end detail.&amp;nbsp; I'll give you correct and me helpful if I just find some little wrinkle to fix. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2014 20:01:52 GMT</pubDate>
    <dc:creator>stevelord</dc:creator>
    <dc:date>2014-05-09T20:01:52Z</dc:date>
    <item>
      <title>Line Graph, put 0s where no data present for activity date?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610477#M679932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have activity log data by day where people log activity on many days, but not all days.&amp;nbsp; On my line charts, if a person logs 5 on May 1, has no data present on May 2, and logs 5 on May 3, I end up with a line cutting straight across from May 1 to May 3 when I'd like it to V with a 0 on May 2.&amp;nbsp; The source data is created by an automation that only puts people on the list each day if they had activity that day- it doesn't populate with people who have 0 activity that day, so I can't just pull in 0s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shoot me some tried and true solution to make this happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source data looks like&lt;/P&gt;&lt;P&gt;Date, Name, Count&lt;/P&gt;&lt;P&gt;May 1 2014, Joe, 5&lt;/P&gt;&lt;P&gt;May 1 2014, Bill, 3&lt;/P&gt;&lt;P&gt;May 2 2014, Bill, 2&lt;/P&gt;&lt;P&gt;May 3 2014, Joe 5&lt;/P&gt;&lt;P&gt;May 3 2014, Bill 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want the graph to show 5,0,5 in a V shape for Joe instead of a flat line with no date under the middle.&amp;nbsp; (The date will be there if both Joe and Bill are present on the graph.)&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, 07 May 2014 21:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610477#M679932</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2014-05-07T21:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Line Graph, put 0s where no data present for activity date?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610478#M679933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your sample data, use the following script to reach a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_1399509966207179 jive_macro_code" jivemacro_uid="_1399509966207179"&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;LOAD Date(Date#(Date,'MMM D YYYY')) as Date1, * Inline [&lt;/P&gt;
&lt;P&gt;Date, Name, Count&lt;/P&gt;
&lt;P&gt;May 1 2014, Joe, 5&lt;/P&gt;
&lt;P&gt;May 1 2014, Bill, 3&lt;/P&gt;
&lt;P&gt;May 2 2014, Bill, 2&lt;/P&gt;
&lt;P&gt;May 3 2014, Joe, 5&lt;/P&gt;
&lt;P&gt;May 3 2014, Bill, 1&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;Temp:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;LOAD Max(Date1) as maxdate, Min(Date1) as mindate Resident Data;&lt;/P&gt;
&lt;P&gt;LET vMinDate = Peek('mindate',-1,'Temp');&lt;/P&gt;
&lt;P&gt;LET vMaxDate = Peek('maxdate',-1,'Temp');&lt;/P&gt;
&lt;P&gt;DROP Table Temp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;AllDates:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;LOAD Date($(vMinDate) + IterNo() - 1) as RequiredDate&lt;/P&gt;
&lt;P&gt;AutoGenerate 1&lt;/P&gt;
&lt;P&gt;While $(vMinDate)+IterNo()-1 &amp;lt;= $(vMaxDate);&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;AllData:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;LOAD Distinct Name Resident Data;&lt;/P&gt;
&lt;P&gt;Outer Join (AllData) LOAD RequiredDate Resident AllDates;&lt;/P&gt;
&lt;P&gt;DROP Table AllDates;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;Left Join (AllData) LOAD Date1 as RequiredDate, Name, Count Resident Data;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;DROP Table Data;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;Result:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;/P&gt;
&lt;P&gt;LOAD RequiredDate, Name, If(IsNull(Count),0,Count) as Count;&lt;/P&gt;
&lt;P&gt;LOAD * Resident AllData;&lt;/P&gt;
&lt;P&gt;DROP Table AllData;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 00:37:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610478#M679933</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2014-05-08T00:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Line Graph, put 0s where no data present for activity date?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610479#M679934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working to implement this now and will let you know how it goes.&amp;nbsp; Thanks!&amp;nbsp; (I'll switch from helpful to correct answer for you after I can confirm and let the community know if I come across some loose-end detail.&amp;nbsp; I'll give you correct and me helpful if I just find some little wrinkle to fix. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 20:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610479#M679934</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2014-05-09T20:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Line Graph, put 0s where no data present for activity date?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610480#M679935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I almost have it through.&amp;nbsp; It gets an error message at this point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------&lt;/P&gt;&lt;P&gt;Field not found - &amp;lt;&amp;lt;=&amp;gt;&lt;/P&gt;&lt;P&gt;AllDates:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD Date( + IterNo() - 1) as RequiredDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;AutoGenerate 1&amp;nbsp; &lt;/P&gt;&lt;P&gt;While +IterNo()-1 &amp;lt;= &lt;/P&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like a simple syntax thing, and I think I have the rest laid out correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have an idea how to fix the syntax wrinkl mentioned in the above error message?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 23:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610480#M679935</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2014-05-09T23:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Line Graph, put 0s where no data present for activity date?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610481#M679936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached the sample application using my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure vMinDate and vMaxDate has date as numbers.&lt;/P&gt;&lt;P&gt;If you are using formatted date string such as 05/01/2014, convert the dates to mumbers. For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMinDate = Num(Date#('05/01/2014','MM/DD/YYYY'));&lt;/P&gt;&lt;P&gt;vMaxDate = Num(Date#('05/03/2014','MM/DD/YYYY'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 May 2014 00:32:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610481#M679936</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2014-05-10T00:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Line Graph, put 0s where no data present for activity date?</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610482#M679937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; The first half of your script looks like it was all that was needed, and maybe not the join and reload stuff.&amp;nbsp; I found this video which did what you did up to a point, but the narrator just let the source data join itself to the Calendar table he created on the date field in common.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/48693"&gt;Creating A Master Calendar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I will say, I banged my head on this for hours, and ran around in circles, and ultimately made a CalendarHack.xlsx worksheet with a FileDate field with 20 years of dates in it, and a CHValue field with 0 values, then made an if statement to sum the CHValues if no value on the real table.&amp;nbsp; When THAT didn't work, I knew it wasn't the fault of the script or the expressions and wandered around in my line graph properties.&amp;nbsp; I fell on 'suppress 0 values' and 'omit missing values' check boxes.&amp;nbsp; I UNCHECKED THOSE and BOOM all the days with 0s showed up!&amp;nbsp; I commented out my calendar hack file, then uncommented the varmindate varmaxdate temp master calendar stuff, and the 0s were still present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I can confirm the calendar stuff you presented works but that maybe you're okay letting it join itself on the common key field rather than the extra rounds of joins.&amp;nbsp; Additionally, users will need to uncheck the suppress 0 and uncheck the omit missing data checkboxes to let the 0s shine through on the line graph.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I'll give you the correct answer credit and meself a helpful for finding this extra video and figuring out the check boxes needed to let the 0s on the chart after the script created the missing days. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2014 00:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Graph-put-0s-where-no-data-present-for-activity-date/m-p/610482#M679937</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2014-05-14T00:32:13Z</dc:date>
    </item>
  </channel>
</rss>

