<?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 Week Function Not Working? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897780#M74105</link>
    <description>&lt;P&gt;Hello!!&lt;/P&gt;
&lt;P&gt;I have three fields: Year, Month, Week (of the month, 1-5) and am trying to use Qliks week and date functions to produce the Wednesday date of each week. The approach I have taken works for most cases, but for some reason the week() function in qlik is not always producing the week number I am expecting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, for 2021, September, Week 1, I would expect September 1st, but Qlik is booting the date back one week to September 8th. This is because the Week() function returns week #36 for date 9/1/2021, even though this is the 35th week (/wednesday) of the year (see &lt;A href="https://calcudater.com/wednesdays-in-2021" target="_blank" rel="noopener"&gt;https://calcudater.com/wednesdays-in-2021&lt;/A&gt;). I have tried using the various arguments available for MakeDate, Week, and MakeWeekDate, but nothing is fixing this problem. Please Help!!!!!!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date expression:&amp;nbsp; MakeWeekDate(PricingYear, Week(MakeDate(PricingYear, PricingMonth), 2) + PricingWeek-1, 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(2=wednesday)&lt;/P&gt;
&lt;P&gt;Example Table: (first column is a concatenation of the year/month/week values)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arome_0-1645812492615.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/73131iA107F9249EF0F35E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arome_0-1645812492615.png" alt="arome_0-1645812492615.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Feb 2022 23:32:01 GMT</pubDate>
    <dc:creator>arome</dc:creator>
    <dc:date>2022-02-25T23:32:01Z</dc:date>
    <item>
      <title>Week Function Not Working?</title>
      <link>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897780#M74105</link>
      <description>&lt;P&gt;Hello!!&lt;/P&gt;
&lt;P&gt;I have three fields: Year, Month, Week (of the month, 1-5) and am trying to use Qliks week and date functions to produce the Wednesday date of each week. The approach I have taken works for most cases, but for some reason the week() function in qlik is not always producing the week number I am expecting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, for 2021, September, Week 1, I would expect September 1st, but Qlik is booting the date back one week to September 8th. This is because the Week() function returns week #36 for date 9/1/2021, even though this is the 35th week (/wednesday) of the year (see &lt;A href="https://calcudater.com/wednesdays-in-2021" target="_blank" rel="noopener"&gt;https://calcudater.com/wednesdays-in-2021&lt;/A&gt;). I have tried using the various arguments available for MakeDate, Week, and MakeWeekDate, but nothing is fixing this problem. Please Help!!!!!!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date expression:&amp;nbsp; MakeWeekDate(PricingYear, Week(MakeDate(PricingYear, PricingMonth), 2) + PricingWeek-1, 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(2=wednesday)&lt;/P&gt;
&lt;P&gt;Example Table: (first column is a concatenation of the year/month/week values)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arome_0-1645812492615.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/73131iA107F9249EF0F35E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arome_0-1645812492615.png" alt="arome_0-1645812492615.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 23:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897780#M74105</guid>
      <dc:creator>arome</dc:creator>
      <dc:date>2022-02-25T23:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Week Function Not Working?</title>
      <link>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897796#M74107</link>
      <description>&lt;P&gt;Great question! I'm not sure.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 19:14:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897796#M74107</guid>
      <dc:creator>tstach</dc:creator>
      <dc:date>2022-02-25T19:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Week Function Not Working?</title>
      <link>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897807#M74110</link>
      <description>&lt;P&gt;Maybe BrokenWeeks=0 would show your expected results?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/week.htm#:~:text=FirstWeekDay-,broken_weeks,-If%20you%20don%27t" target="_blank"&gt;https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunctions/week.htm#:~:text=FirstWeekDay-,broken_weeks,-If%20you%20don%27t&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 19:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897807#M74110</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-02-25T19:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Week Function Not Working?</title>
      <link>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897811#M74111</link>
      <description>&lt;P&gt;Thank you for your response! Unfortunately, changing the broken weeks value has no effect on the result.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 20:25:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1897811#M74111</guid>
      <dc:creator>arome</dc:creator>
      <dc:date>2022-02-25T20:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Week Function Not Working?</title>
      <link>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1898121#M74136</link>
      <description>&lt;P&gt;it is because of your week definition: "Week(MakeDate(PricingYear, PricingMonth),&lt;STRONG&gt; 2&lt;/STRONG&gt;)"&lt;BR /&gt;You say to qlik that the week should start on wednesdays. Set this to 0(monday) or 6(sunday), depending what is the official weekstart in your region.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 08:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Week-Function-Not-Working/m-p/1898121#M74136</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-28T08:53:10Z</dc:date>
    </item>
  </channel>
</rss>

