<?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 Dynamic Date Range Line Chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7420#M597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 tables.&amp;nbsp; One event table, one data table.&lt;/P&gt;&lt;P&gt;This is all time-series data.&amp;nbsp; From the Data table, an event is recognized, and established in the Event Table (outside of Qlik).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So - for example, &lt;/P&gt;&lt;P&gt;Data is perpetual, timestamped every minute:&amp;nbsp; Let's say that happens for a month (jan 1 - jan31)&lt;/P&gt;&lt;P&gt;An event occurs on Jan 10, lasting 16 hours into Jan 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event:&lt;/P&gt;&lt;P&gt;id, startTimeStamp, endTimeStamp, eventdata1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;id, dataTimeStamp, data2, data3, data4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have formatted all the dates/times and created a DateLink table for a commonDate, loading the 3 dates independently and assigning dateTypes.&amp;nbsp; (&lt;A href="http://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/" title="http://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/"&gt;Search Recipes | Qlikview Cookbook&lt;/A&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd like to see is:&lt;/P&gt;&lt;P&gt;DURING the event window (in this case 1/10-1/11) what was the associated data from the Data Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in a line chart, I'd like my date range to be dynamic by selection of id.&amp;nbsp; In the date dimension, my latest attempt is:&lt;/P&gt;&lt;P&gt;if(dataTimeStamp &amp;lt;= min(startTimeStamp) AND dataTimeStamp &amp;gt;= max(endTimeStamp), dataTimeStamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sense hates this and produces invalid dimension.&amp;nbsp; I have verified syntax and all seems to be good.&amp;nbsp; I've tried removing min and max functions as well, still not producing a valid result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jan 2018 19:16:20 GMT</pubDate>
    <dc:creator>joey_lutes</dc:creator>
    <dc:date>2018-01-25T19:16:20Z</dc:date>
    <item>
      <title>Dynamic Date Range Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7420#M597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 tables.&amp;nbsp; One event table, one data table.&lt;/P&gt;&lt;P&gt;This is all time-series data.&amp;nbsp; From the Data table, an event is recognized, and established in the Event Table (outside of Qlik).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So - for example, &lt;/P&gt;&lt;P&gt;Data is perpetual, timestamped every minute:&amp;nbsp; Let's say that happens for a month (jan 1 - jan31)&lt;/P&gt;&lt;P&gt;An event occurs on Jan 10, lasting 16 hours into Jan 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event:&lt;/P&gt;&lt;P&gt;id, startTimeStamp, endTimeStamp, eventdata1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;id, dataTimeStamp, data2, data3, data4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have formatted all the dates/times and created a DateLink table for a commonDate, loading the 3 dates independently and assigning dateTypes.&amp;nbsp; (&lt;A href="http://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/" title="http://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/"&gt;Search Recipes | Qlikview Cookbook&lt;/A&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd like to see is:&lt;/P&gt;&lt;P&gt;DURING the event window (in this case 1/10-1/11) what was the associated data from the Data Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in a line chart, I'd like my date range to be dynamic by selection of id.&amp;nbsp; In the date dimension, my latest attempt is:&lt;/P&gt;&lt;P&gt;if(dataTimeStamp &amp;lt;= min(startTimeStamp) AND dataTimeStamp &amp;gt;= max(endTimeStamp), dataTimeStamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sense hates this and produces invalid dimension.&amp;nbsp; I have verified syntax and all seems to be good.&amp;nbsp; I've tried removing min and max functions as well, still not producing a valid result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7420#M597</guid>
      <dc:creator>joey_lutes</dc:creator>
      <dc:date>2018-01-25T19:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Range Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7421#M598</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;It is because aggregation without advanced aggregation function is not allowed in dimension.&lt;/P&gt;&lt;P&gt;What you should do is&lt;/P&gt;&lt;P&gt;1. Create 2 variables. 1 to store the Start and other to store the End. Like below&lt;/P&gt;&lt;P&gt;vMin = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;min(startTimeStamp)&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;vMax = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;max(endTimeStamp)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Now replace the Max and Min function in your dimension expression with this variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(dataTimeStamp &amp;lt;=$(vMin) AND dataTimeStamp &amp;gt;= $(vMax), dataTimeStamp)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Kaushik Solanki&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7421#M598</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2018-01-25T19:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Range Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7422#M599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what if you put =min(startTimeStamp) and =max(endTimeStamp) in two variables and use it in the expression. don't forget to put = in the variable definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets see if sense still hates it ..&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:37:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7422#M599</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2018-01-25T19:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Range Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7423#M600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually thought about that but didn't try it.&lt;/P&gt;&lt;P&gt;I did it, and it's still giving me fits, though it's a little better.&lt;/P&gt;&lt;P&gt;While the graph does display correctly with no selections, when an id is selected, it breaks (though no invalid dimension error).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After further review, the variable is not calculating correctly:&lt;/P&gt;&lt;P&gt;I added a couple KPIs to the page to view,&lt;/P&gt;&lt;P&gt;min(startTimeStamp) shows the accurate date while $(vMinStart) shows something completely different (1905 date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Weird because I added the variable correctly it would seem.&lt;/P&gt;&lt;P&gt;=min(startTimeStamp)&lt;/P&gt;&lt;P&gt;when I do the same thing in the KPI, it produces a different result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7423#M600</guid>
      <dc:creator>joey_lutes</dc:creator>
      <dc:date>2018-01-25T19:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Range Line Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7424#M601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems there is something wrong with the data type of the dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 19:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Date-Range-Line-Chart/m-p/7424#M601</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2018-01-25T19:48:58Z</dc:date>
    </item>
  </channel>
</rss>

