<?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: $ sign expansion for dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584524#M42745</link>
    <description>&lt;P&gt;Thanks for the suggestion - it doesn't work however.&amp;nbsp; The following error messages comes up:&lt;/P&gt;&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;Field '' not found&lt;/DIV&gt;&lt;DIV class="empty undefined"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;The error occurred here:&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;?&lt;/DIV&gt;</description>
    <pubDate>Fri, 24 May 2019 13:39:47 GMT</pubDate>
    <dc:creator>andreacossu1</dc:creator>
    <dc:date>2019-05-24T13:39:47Z</dc:date>
    <item>
      <title>$ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584193#M42723</link>
      <description>&lt;P&gt;I have a simple table with 3 columns:&lt;/P&gt;&lt;P&gt;Date 1 containing dates&lt;/P&gt;&lt;P&gt;Date 2 containing different dates&lt;/P&gt;&lt;P&gt;ChosenDate containing either the value Date1 or Date 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each record I would like to see a field called NewDate which is either Date1 or Date2 depending on the value in ChosenDate.&amp;nbsp; Currently I tried $(ChosenDate) as NewDate but no luck.&amp;nbsp; Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 21:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584193#M42723</guid>
      <dc:creator>andreacossu1</dc:creator>
      <dc:date>2019-05-23T21:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584195#M42724</link>
      <description>&lt;P&gt;Are you trying to do this in the script or in a chart?&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 21:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584195#M42724</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-05-23T21:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584196#M42725</link>
      <description>&lt;P&gt;script&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 21:26:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584196#M42725</guid>
      <dc:creator>andreacossu1</dc:creator>
      <dc:date>2019-05-23T21:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584202#M42726</link>
      <description>&lt;P&gt;Try this, I think it meets your need.&lt;/P&gt;&lt;P&gt;Pick(Match([&lt;SPAN&gt;ChosenDate],'Date1', 'Date2') ,[Date 1], [Date 2]) sa NewField&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 21:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584202#M42726</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-05-23T21:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584247#M42727</link>
      <description>&lt;P&gt;I would think&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[$(ChosenDate)] as NewDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;would do it. What error/problem are you getting when you use that in script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 04:10:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584247#M42727</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-05-24T04:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584524#M42745</link>
      <description>&lt;P&gt;Thanks for the suggestion - it doesn't work however.&amp;nbsp; The following error messages comes up:&lt;/P&gt;&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;Field '' not found&lt;/DIV&gt;&lt;DIV class="empty undefined"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;The error occurred here:&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;?&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 May 2019 13:39:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584524#M42745</guid>
      <dc:creator>andreacossu1</dc:creator>
      <dc:date>2019-05-24T13:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584532#M42746</link>
      <description>Im not certain that a dollar expansion will work, but you could try to adjust &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt; proposal like this&lt;BR /&gt;&lt;BR /&gt;[$(=ChosenDate)] as NewDate</description>
      <pubDate>Fri, 24 May 2019 14:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584532#M42746</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-05-24T14:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584584#M42752</link>
      <description>&lt;P&gt;Ok, I just reread the original post.&amp;nbsp; I see know we are talking about fields and varying per row.&amp;nbsp; Try this.&lt;/P&gt;&lt;P&gt;if(ChosenDate = 'Date1', Date1, Date2) as NewDate&lt;/P&gt;&lt;P&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;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 15:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584584#M42752</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-05-24T15:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584651#M42758</link>
      <description>&lt;P&gt;Thanks both - unfortunately with the new dollar expansion I get the same error message.&amp;nbsp; The if statement or alternative the pick(match()) both work but aren't ideal as actually I have Date1, ..., Date 20 not just 2 dates and so I was hoping to avoid a large nested if statement or a large pick match statement....&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 18:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584651#M42758</guid>
      <dc:creator>andreacossu1</dc:creator>
      <dc:date>2019-05-24T18:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584700#M42763</link>
      <description>You could also loop through your fields.&lt;BR /&gt;For _type=1 to 20&lt;BR /&gt;Load&lt;BR /&gt;...&lt;BR /&gt;[Date $(_type)] as NewDate&lt;BR /&gt;FROM source&lt;BR /&gt;Where&lt;BR /&gt;ChosenDate = 'Date $(_type)'&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;It might not be an better approach than the ones mentioned above, but you will get rid of the nested IF.</description>
      <pubDate>Fri, 24 May 2019 22:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584700#M42763</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-05-24T22:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584704#M42764</link>
      <description>&lt;P&gt;I think this will work:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Data:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD *, RecNo() as Key INLINE [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ChosenDate, Date1, Date2, Date3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Date1, 100, 200, 300&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Date2, 101, 201, 301&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Date3, 103, 203, 303&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Date2, 104, 204, 304&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Choose:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Key,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;peek(peek('ChosenDate', RecNo()-1, 'Data'), RecNo()-1, 'Data') as NewDate&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident Data&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&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;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 23:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584704#M42764</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-05-24T23:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584979#M42782</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; Unfortunately I don't have RecNo in my table, which is a complex join of other tables.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 09:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1584979#M42782</guid>
      <dc:creator>andreacossu1</dc:creator>
      <dc:date>2019-05-27T09:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: $ sign expansion for dates</title>
      <link>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1585119#M42793</link>
      <description>&lt;P&gt;RecNo() is not a field, it's a counter function. You have it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 13:54:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sign-expansion-for-dates/m-p/1585119#M42793</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-05-27T13:54:57Z</dc:date>
    </item>
  </channel>
</rss>

