<?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: Logic help related to Current Week Vs last Year Week. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377207#M800204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi A.M.,&lt;/P&gt;&lt;P&gt;As per your logic In year 2017 1st week has 8 days. but according my requirement 1week should have only day. and second week should be start&amp;nbsp; from Monday. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Nov 2017 10:41:46 GMT</pubDate>
    <dc:creator>lalitkgehlot89</dc:creator>
    <dc:date>2017-11-27T10:41:46Z</dc:date>
    <item>
      <title>Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377205#M800202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In Sample data I have three Fields, Storeid, Date &amp;amp; Sales Amount.&lt;/P&gt;&lt;P&gt;I want to make a Straight table which show sales data of current week and last year same week sales data.&lt;/P&gt;&lt;P&gt;And first week should be from 1Jan and after that secound,third,fourth... should be start from Monday.&lt;/P&gt;&lt;P&gt;for more reference data given in weekcal file.&lt;/P&gt;&lt;P&gt;Please help me out to create the logic for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lalit Kumar &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/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377205#M800202</guid>
      <dc:creator>lalitkgehlot89</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377206#M800203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lalit, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could use the following expression in the script: &lt;/P&gt;&lt;P&gt;LOAD STOREID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Posting Date], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH([Posting Date]) AS Month,&lt;/P&gt;&lt;P&gt;RIGHT('00'&amp;amp;IF(DAYNUMBEROFYEAR([Posting Date])&amp;lt;=7 AND WEEK([Posting Date])&amp;gt;2,1,IF(DAYNUMBEROFYEAR([Posting Date])&amp;gt;=358 AND WEEK([Posting Date])&amp;lt;2,53,WEEK([Posting Date]))),2) AS Week,&lt;/P&gt;&lt;P&gt;IF(YEAR([Posting Date]) = 2017, 1) AS _CurrentYear,&lt;/P&gt;&lt;P&gt;IF(YEAR([Posting Date]) = 2017-1, 1) AS _LastYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Sample data.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Document_CH224);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing: I just hardcoded 2017, you probably want to make it dynamically. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 10:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377206#M800203</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-27T10:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377207#M800204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi A.M.,&lt;/P&gt;&lt;P&gt;As per your logic In year 2017 1st week has 8 days. but according my requirement 1week should have only day. and second week should be start&amp;nbsp; from Monday. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 10:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377207#M800204</guid>
      <dc:creator>lalitkgehlot89</dc:creator>
      <dc:date>2017-11-27T10:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377208#M800205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lalit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cheated a bit on the weeks because 1-1-2017 will be week 52 (or 53). So I updated the script.&lt;/P&gt;&lt;P&gt;- 12:00 update - needed to tweak the years not starting at 1-1, so I created a first date flag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sourcetable:&lt;/P&gt;&lt;P&gt;LOAD STOREID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Posting Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH([Posting Date]) AS Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Sample data.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Document_CH224);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (sourcetable) LOAD &lt;/P&gt;&lt;P&gt;MIN([Posting Date]) AS [Posting Date],&lt;/P&gt;&lt;P&gt;1 AS Yearstart&lt;/P&gt;&lt;P&gt;RESIDENT sourcetable&lt;/P&gt;&lt;P&gt;GROUP BY YEAR([Posting Date]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;STOREID, &lt;/P&gt;&lt;P&gt;[Posting Date],&lt;/P&gt;&lt;P&gt;Month, &lt;/P&gt;&lt;P&gt;IF(YEAR([Posting Date]) = 2017, 1) AS _CurrentYear,&lt;/P&gt;&lt;P&gt;IF(YEAR([Posting Date]) = 2017-1, 1) AS _LastYear,&lt;/P&gt;&lt;P&gt;IF(Yearstart = 1,IF([Posting Date] = YEARSTART([Posting Date]) , 1,WEEK([Posting Date])), IF(NUM(WEEKDAY([Posting Date]))=0 AND [Posting Date] &amp;lt;&amp;gt; PEEK('Posting Date',-1),PEEK('Week',-1)+1,PEEK('Week',-1))) AS Week,&lt;/P&gt;&lt;P&gt;WEEKDAY([Posting Date]) AS Weekday,&lt;/P&gt;&lt;P&gt;Amount&lt;/P&gt;&lt;P&gt;RESIDENT sourcetable&lt;/P&gt;&lt;P&gt;ORDER BY [Posting Date];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE sourcetable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 10:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377208#M800205</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-27T10:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377209#M800206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot A.M.&lt;/P&gt;&lt;P&gt;Please let me how to right this expression in straight table for current year week 48 sales data and Last year week 48 sales data comparison. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377209#M800206</guid>
      <dc:creator>lalitkgehlot89</dc:creator>
      <dc:date>2017-11-27T11:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377210#M800207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lalit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made a chart with [Week] as dimension.&lt;/P&gt;&lt;P&gt;In the expression I created:&lt;/P&gt;&lt;P&gt;SUM({$&amp;lt;_CurrentYear={1}&amp;gt;} Amount) and SUM({$&amp;lt;_LastYear={1}&amp;gt;} Amount). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached an example. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:23:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377210#M800207</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-27T11:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377211#M800208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to let you know: the weeks that i've created aren't the same as the weeks on the calendar. I just started counting from the first day of the year and every monday the week gets 1 higher. So calender week 48 in the current year is basically the 48th monday. that can be different for the current year and the last year. &lt;SPAN style="font-size: 13.3333px;"&gt;Keep that in mind.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377211#M800208</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-27T11:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377212#M800209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi A.M.,&lt;/P&gt;&lt;P&gt;I want only three fields in chart 1) StoreiD, 2)Week 48 current Amounnt 3) week 48 Last Year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377212#M800209</guid>
      <dc:creator>lalitkgehlot89</dc:creator>
      <dc:date>2017-11-27T11:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377213#M800210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi A.M.&lt;/P&gt;&lt;P&gt;Yes you are right, but my requirement is something like this comparison should be between current year week(48) vs last year week(48). &lt;SPAN style="font-size: 10pt;"&gt;doesn't matter days and dates are same or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377213#M800210</guid>
      <dc:creator>lalitkgehlot89</dc:creator>
      <dc:date>2017-11-27T11:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377214#M800214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dimensions: &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;- StoreID &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;- Week&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;&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;Expressions&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;- SUM({$&amp;lt;_CurrentYear={1},Week={48}&amp;gt;} Amount) &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;- SUM({$&amp;lt;_LastYear={1}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,Week={48}&lt;/SPAN&gt;&amp;gt;} Amount).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377214#M800214</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-27T11:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377215#M800219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one will not work on next week.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 12:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377215#M800219</guid>
      <dc:creator>lalitkgehlot89</dc:creator>
      <dc:date>2017-11-27T12:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Logic help related to Current Week Vs last Year Week.</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377216#M800222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you would make week={48} dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;- SUM({$&amp;lt;_CurrentYear={1},Week={$(=MAX(Week))}&amp;gt;} Amount)&amp;nbsp; // based on selection&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;- Create variable: vWeek = MAX(Week)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; SUM({$&amp;lt;_LastYear={1}&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;,Week={$(vWeek)}&lt;/SPAN&gt;&amp;gt;} Amount).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 12:10:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-help-related-to-Current-Week-Vs-last-Year-Week/m-p/1377216#M800222</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-27T12:10:31Z</dc:date>
    </item>
  </channel>
</rss>

