<?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: WeekName() Set Expression Does Not Work For Range in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511072#M105000</link>
    <description>&lt;P&gt;Ok, just checked the documentation again for the function weekname() and understood why it is not working. The&amp;nbsp;&lt;SPAN&gt;underlying numeric value of the weekname() corresponds to a timestamp of the first millisecond of the first day of the week containing&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;date&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That is why if I use in my set expression:&lt;STRONG&gt;&amp;nbsp;{&amp;lt;WeekYear = {"&amp;gt;=2024-01-01&amp;lt;=2024-02-15"}&amp;gt;}&amp;nbsp;&lt;/STRONG&gt;it works properly. We need to pass a date in the range search because this is the underlying numeric/date data type of the weekname() function.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-22 150656.png" style="width: 893px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178877i28BA1BA0D1171A1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-22 150656.png" alt="Screenshot 2025-03-22 150656.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Mar 2025 13:09:27 GMT</pubDate>
    <dc:creator>DMilchev</dc:creator>
    <dc:date>2025-03-22T13:09:27Z</dc:date>
    <item>
      <title>WeekName() Set Expression Does Not Work For Range</title>
      <link>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511060#M104995</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having issues with Set Expression using field for Week Year. My expression is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;WeekYear = {"&amp;gt;=2024/10&amp;lt;=2024/11"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The field WeekYear is created in my MasterCalendar&amp;nbsp; as WeekName([$(DateField)]) as $(Prefix)WeekYear and the format of the field is YYYY/WW ex. 2024/10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I write the Set Expression for searching a range like "&lt;STRONG&gt;&amp;gt;=2024/10&amp;lt;=2024/11&lt;/STRONG&gt;" it does not work. Meanwhile, Qlik is correctly searching a range for field MonthYear which is formated as MM.YYYY.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;[Month Year] = {"&amp;gt;=05.2024&amp;lt;=10.2024"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM(1)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Mar 2025 08:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511060#M104995</guid>
      <dc:creator>DMilchev</dc:creator>
      <dc:date>2025-03-22T08:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: WeekName() Set Expression Does Not Work For Range</title>
      <link>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511064#M104998</link>
      <description>&lt;P&gt;Hi, I'm not sure if the dot version is working because it's like a number, Do you have data for other years in that sample?&lt;/P&gt;&lt;P&gt;Anyway, for dates I usually add a field in the calendar table in numeric format, and use that numeric fields in set analysis, in example, for WeekYear I would have a YearWeekNum field, with values like 202405, 202410, 202411... where the numeric comparison for &amp;gt;= or &amp;lt;= always works&lt;/P&gt;</description>
      <pubDate>Sat, 22 Mar 2025 10:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511064#M104998</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-03-22T10:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: WeekName() Set Expression Does Not Work For Range</title>
      <link>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511069#M104999</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for responding!&lt;/P&gt;&lt;P&gt;So Qlik is interpreting both fields WeekYear (YYYY/WW ) and MonthYear (MM.YYYY) as numeric and date but the numeric composition for "&amp;gt;=" does not work for WeekYear in set expression&amp;nbsp; while it works fine for MonthYear. For me it is strange that the field WeekYear which is interpreted as numeric cannot use the range search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-22 145345.png" style="width: 767px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178874i787F32C92838B01C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-22 145345.png" alt="Screenshot 2025-03-22 145345.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-22 145549.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178875iBA9403B3E54986A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-03-22 145549.png" alt="Screenshot 2025-03-22 145549.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Mar 2025 12:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511069#M104999</guid>
      <dc:creator>DMilchev</dc:creator>
      <dc:date>2025-03-22T12:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: WeekName() Set Expression Does Not Work For Range</title>
      <link>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511072#M105000</link>
      <description>&lt;P&gt;Ok, just checked the documentation again for the function weekname() and understood why it is not working. The&amp;nbsp;&lt;SPAN&gt;underlying numeric value of the weekname() corresponds to a timestamp of the first millisecond of the first day of the week containing&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;date&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That is why if I use in my set expression:&lt;STRONG&gt;&amp;nbsp;{&amp;lt;WeekYear = {"&amp;gt;=2024-01-01&amp;lt;=2024-02-15"}&amp;gt;}&amp;nbsp;&lt;/STRONG&gt;it works properly. We need to pass a date in the range search because this is the underlying numeric/date data type of the weekname() function.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-22 150656.png" style="width: 893px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178877i28BA1BA0D1171A1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-22 150656.png" alt="Screenshot 2025-03-22 150656.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Mar 2025 13:09:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/WeekName-Set-Expression-Does-Not-Work-For-Range/m-p/2511072#M105000</guid>
      <dc:creator>DMilchev</dc:creator>
      <dc:date>2025-03-22T13:09:27Z</dc:date>
    </item>
  </channel>
</rss>

