<?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: Load flag field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733557#M721013</link>
    <description>&lt;P&gt;Thanks again for the reply.&lt;/P&gt;&lt;P&gt;I was hoping to create a field, so that I can filter by that,as I would ideally want to show only the results for 'Y'.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2020 19:05:01 GMT</pubDate>
    <dc:creator>danielnevitt</dc:creator>
    <dc:date>2020-08-05T19:05:01Z</dc:date>
    <item>
      <title>Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733330#M721007</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I'm trying to create a flag field which indicates where there are both Buys and Sells (field name 'Side') on specific days (field name 'TransactDate') and for specific products (field name 'Symbol')&lt;/P&gt;&lt;P&gt;As an example:&lt;/P&gt;&lt;P&gt;TransactDate&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Symbol&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Side&lt;BR /&gt;04/08/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Buy&lt;BR /&gt;04/08/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sell&lt;BR /&gt;04/08/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;456&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Buy&lt;BR /&gt;04/08/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;456&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Buy&lt;/P&gt;&lt;P&gt;Using the above data I would like the new flag field to show 'Y' for product 123 on date 04/08/2020 and 'N' for product 456 on 04/08/2020.&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733330#M721007</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733333#M721008</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;using the following script, I get a new column named flag which shows Y for Symbol 123 (both data rows) and N for 456&lt;BR /&gt;Is it what you want? The solution using concat is one possibility to achieve it. Hope it helps!&lt;/P&gt;&lt;P&gt;TEST:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;TransactDate, Symbol, Side&lt;BR /&gt;04/08/2020, 123, Buy&lt;BR /&gt;04/08/2020, 123, Sell&lt;BR /&gt;04/08/2020, 456, Buy&lt;BR /&gt;04/08/2020, 456, Buy&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;TEST1:&lt;BR /&gt;NoConcatenate load&lt;BR /&gt;TransactDate,&lt;BR /&gt;Symbol,&lt;BR /&gt;concat(Side,'/') as Sidenew&lt;BR /&gt;Resident TEST&lt;BR /&gt;group by TransactDate, Symbol;&lt;/P&gt;&lt;P&gt;left join(TEST)&lt;BR /&gt;load *,&lt;BR /&gt;if (Sidenew='Buy/Sell' or Sidenew='Sell/Buy','Y','N') as Flag&lt;BR /&gt;resident TEST1;&lt;/P&gt;&lt;P&gt;drop table TEST1;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 08:49:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733333#M721008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-05T08:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733340#M721009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the quick reply.&amp;nbsp; Is it possible to create a single line in the code?&amp;nbsp; I'm not sure how I would add your solution to the full sql that I have.&lt;/P&gt;&lt;P&gt;I was hoping I could create something like the below:&lt;/P&gt;&lt;P&gt;If(Count({&amp;lt;Side={'Buy'}&amp;gt;}TransactDateSymbol)&amp;gt;0 and Count({&amp;lt;Side={'Sell'}&amp;gt;}TransactDateSymbol)&amp;gt;0,'Y') where TransactDateSymbol is a concatenated field of TransactDate and Symbol, however I'm not sure if this makes sense or is possible.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 09:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733340#M721009</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2020-08-05T09:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733371#M721010</link>
      <description>&lt;P&gt;try below&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=if(sum(total &amp;lt;TransactDate,Symbol&amp;gt;aggr(Count({&amp;lt;Side={'Buy'}&amp;gt;+{&amp;lt;Side={'Sell'}&amp;gt;}Side),TransactDate,Symbol))&amp;gt;=1,'Y','N')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-08-05 114009.png" style="width: 745px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/38556iA8CFEF0CCE83D379/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-08-05 114009.png" alt="Annotation 2020-08-05 114009.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 10:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733371#M721010</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-05T10:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733525#M721011</link>
      <description>&lt;P&gt;Thank you so much, that works perfectly in the expression in the table I am using.&lt;/P&gt;&lt;P&gt;Do I need to amend the code in any way to use it as part of the load script.&lt;/P&gt;&lt;P&gt;I really appreciate the help with this.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 16:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733525#M721011</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2020-08-05T16:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733543#M721012</link>
      <description>&lt;P&gt;You don't need to amend any code changes. Just use it in your expression&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 17:40:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733543#M721012</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-05T17:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733557#M721013</link>
      <description>&lt;P&gt;Thanks again for the reply.&lt;/P&gt;&lt;P&gt;I was hoping to create a field, so that I can filter by that,as I would ideally want to show only the results for 'Y'.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 19:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733557#M721013</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2020-08-05T19:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733558#M721014</link>
      <description>&lt;P&gt;that also you can achieve it using expression. if you want I can share&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 19:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733558#M721014</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-05T19:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733562#M721015</link>
      <description>&lt;P&gt;That would be great if you can share the expression for that.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 19:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733562#M721015</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2020-08-05T19:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Load flag field</title>
      <link>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733566#M721016</link>
      <description>&lt;P&gt;&lt;EM&gt;the expression which I suggested earlier&amp;nbsp; you can just change the if condition values. Y to 1 wnd N to 0. then you can use suppress zero option&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 19:26:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-flag-field/m-p/1733566#M721016</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-05T19:26:15Z</dc:date>
    </item>
  </channel>
</rss>

