<?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 Derived fields -  $1 meaning  &amp;amp; AutoCalendar in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552513#M39819</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;two questions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Can you pls give me any other real-life, valuable example of using DERIVE &amp;amp; DECLARE instructions than AutoCalendar scenario?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. I'm testing DERIVED and DECLARE instructions, reading Help but can't really get the idea of this 'referenced field'. Help says:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;$1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to reference the data field from which the derived fields should be generated.&lt;/P&gt;&lt;P class="example"&gt;&lt;SPAN class="autonumber"&gt;&lt;SPAN&gt;Example:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;Year($1) As Year tagged '$year'&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;I've tested a typical scenario with AutoCalendar and 4 dates:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;DERIVE FIELDS FROM FIELDS [OrderDate], [Date], [RequiredDate], [DeliveryDate] USING [autoCalendar] ;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Is there any reason to change $1 to $2? Is there any other case which works and makes sense?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Scenario 1 - using $1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ac1.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7301i632B6607281F213B/image-size/large?v=v2&amp;amp;px=999" role="button" title="ac1.png" alt="ac1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Scenario 2 - using $2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ac2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7302i512E15D2258D0FA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="ac2.png" alt="ac2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Many Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 21:18:15 GMT</pubDate>
    <dc:creator>piotr-bratek</dc:creator>
    <dc:date>2024-11-16T21:18:15Z</dc:date>
    <item>
      <title>Derived fields -  $1 meaning  &amp; AutoCalendar</title>
      <link>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552513#M39819</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;two questions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Can you pls give me any other real-life, valuable example of using DERIVE &amp;amp; DECLARE instructions than AutoCalendar scenario?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. I'm testing DERIVED and DECLARE instructions, reading Help but can't really get the idea of this 'referenced field'. Help says:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;$1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to reference the data field from which the derived fields should be generated.&lt;/P&gt;&lt;P class="example"&gt;&lt;SPAN class="autonumber"&gt;&lt;SPAN&gt;Example:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;Year($1) As Year tagged '$year'&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;I've tested a typical scenario with AutoCalendar and 4 dates:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;DERIVE FIELDS FROM FIELDS [OrderDate], [Date], [RequiredDate], [DeliveryDate] USING [autoCalendar] ;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Is there any reason to change $1 to $2? Is there any other case which works and makes sense?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Scenario 1 - using $1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ac1.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7301i632B6607281F213B/image-size/large?v=v2&amp;amp;px=999" role="button" title="ac1.png" alt="ac1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Scenario 2 - using $2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ac2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7302i512E15D2258D0FA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="ac2.png" alt="ac2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;Many Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552513#M39819</guid>
      <dc:creator>piotr-bratek</dc:creator>
      <dc:date>2024-11-16T21:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Derived fields -  $1 meaning  &amp; AutoCalendar</title>
      <link>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552524#M39821</link>
      <description>&lt;P&gt;$1 is simply a placeholder for the field being processed.&amp;nbsp; In your posted example, all fields tagged with '$date' will get processed. If the current field is 'OrderDate', the $1 gets substituted in the script and you have:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;Year(OrderDate) As Year tagged '$year'&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;No, it does not make sense in this example to ever use $2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 16:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552524#M39821</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-03-05T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Derived fields -  $1 meaning  &amp; AutoCalendar</title>
      <link>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552592#M39827</link>
      <description>Thanks Rob! That makes it clear. What about Question 1? I know I could find some potential scenarios, but out of curiosity &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; - have you ever applied this method to create some derived dimensions other than dates ?</description>
      <pubDate>Tue, 05 Mar 2019 21:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Derived-fields-1-meaning-amp-AutoCalendar/m-p/1552592#M39827</guid>
      <dc:creator>piotr-bratek</dc:creator>
      <dc:date>2019-03-05T21:45:44Z</dc:date>
    </item>
  </channel>
</rss>

