<?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: Current Date - Previous Date on same Line Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Date-Previous-Date-on-same-Line-Chart/m-p/806038#M284568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed;&lt;/P&gt;&lt;P&gt;I used the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I give you the example for "Present Month" - "Last Month" - "Before Last Month":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;First step&lt;/STRONG&gt;&lt;/SPAN&gt;:&amp;nbsp; Variables Definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPresent_Month= Month (Today())&lt;/P&gt;&lt;P&gt;vLast_Month= Month(AddMonths(Today(),-1))&lt;/P&gt;&lt;P&gt;vBeforeLast_Month=Month(AddMonths(Today(),-2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Second step&lt;/STRONG&gt;&lt;/SPAN&gt;: Establish the expressions (in my case i count Activated SIM's for the 3 monthes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Expresion for Present Month:&lt;/P&gt;&lt;P&gt;=Count ({$&amp;lt;ActivationMonth={$(vPresent_Month)}&amp;gt;}DISTINCT SIM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) Expresion for Last Month:&lt;/P&gt;&lt;P&gt;=Count ({$&amp;lt;ActivationMonth={$(vLast_Month)}&amp;gt;}DISTINCT SIM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) Expresion for Month "before the Last"&lt;/P&gt;&lt;P&gt;=Count ({$&amp;lt;ActivationMonth={$(vBeforeLast_Month)}&amp;gt;}DISTINCT SIM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expressions can be used in ein Simple Table or in a chart...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Dimension&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The dimension... in my case are geographical regions..... (State - City - County)&lt;/P&gt;&lt;P&gt;You can use for example: ProductID.... SalesRep... etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;In the Load Script i use&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;Month (Activation_Date) as ActivationMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Day o Week... is easier... because you can use the Date or Week Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that help you&lt;/P&gt;&lt;P&gt;Regards. gustavo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Jan 2015 13:24:19 GMT</pubDate>
    <dc:creator>gartigas</dc:creator>
    <dc:date>2015-01-17T13:24:19Z</dc:date>
    <item>
      <title>Current Date - Previous Date on same Line Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Date-Previous-Date-on-same-Line-Chart/m-p/806037#M284567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope everyone is doing well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a requirement to show Current Week and Previous week on the Same line chart.&amp;nbsp; I have built a master calendar. Please see the attached image&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g Current Date = Jan 17, 2015&lt;/P&gt;&lt;P&gt;Our week - Sunday to Saturday&lt;/P&gt;&lt;P&gt;Current Week = Jan 11 - Jan 17&lt;/P&gt;&lt;P&gt;Previous Week = Jan 4 - Jan 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to show the Current Week and Previous Week on the same chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also how can we do the same for&lt;/P&gt;&lt;P&gt;* Current Day - Previous Day&lt;/P&gt;&lt;P&gt;* Current Month - Previous Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Thanks&lt;IMG alt="Note_20150117_125024_01.jpg" class="image-1 jive-image" height="293" src="https://community.qlik.com/legacyfs/online/75575_Note_20150117_125024_01.jpg" style="height: 292.824px; width: 219px;" width="219" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jan 2015 09:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Date-Previous-Date-on-same-Line-Chart/m-p/806037#M284567</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2015-01-17T09:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Current Date - Previous Date on same Line Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Date-Previous-Date-on-same-Line-Chart/m-p/806038#M284568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed;&lt;/P&gt;&lt;P&gt;I used the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I give you the example for "Present Month" - "Last Month" - "Before Last Month":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;First step&lt;/STRONG&gt;&lt;/SPAN&gt;:&amp;nbsp; Variables Definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPresent_Month= Month (Today())&lt;/P&gt;&lt;P&gt;vLast_Month= Month(AddMonths(Today(),-1))&lt;/P&gt;&lt;P&gt;vBeforeLast_Month=Month(AddMonths(Today(),-2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Second step&lt;/STRONG&gt;&lt;/SPAN&gt;: Establish the expressions (in my case i count Activated SIM's for the 3 monthes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Expresion for Present Month:&lt;/P&gt;&lt;P&gt;=Count ({$&amp;lt;ActivationMonth={$(vPresent_Month)}&amp;gt;}DISTINCT SIM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) Expresion for Last Month:&lt;/P&gt;&lt;P&gt;=Count ({$&amp;lt;ActivationMonth={$(vLast_Month)}&amp;gt;}DISTINCT SIM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) Expresion for Month "before the Last"&lt;/P&gt;&lt;P&gt;=Count ({$&amp;lt;ActivationMonth={$(vBeforeLast_Month)}&amp;gt;}DISTINCT SIM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expressions can be used in ein Simple Table or in a chart...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Dimension&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The dimension... in my case are geographical regions..... (State - City - County)&lt;/P&gt;&lt;P&gt;You can use for example: ProductID.... SalesRep... etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;In the Load Script i use&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;Month (Activation_Date) as ActivationMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Day o Week... is easier... because you can use the Date or Week Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that help you&lt;/P&gt;&lt;P&gt;Regards. gustavo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jan 2015 13:24:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Date-Previous-Date-on-same-Line-Chart/m-p/806038#M284568</guid>
      <dc:creator>gartigas</dc:creator>
      <dc:date>2015-01-17T13:24:19Z</dc:date>
    </item>
  </channel>
</rss>

