<?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 Help needed with Pick() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-needed-with-Pick-function/m-p/1355877#M516811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on some messy requirements primarily involving different granularity and Account Note Type, I am trying to get the first note of the day (First Note chart, shown below).&amp;nbsp; Counts from the First Note Chart will match up with the total count of the 2 charts below it.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="159284" alt="6qv_good no selections.PNG" class="jive-image image-1" src="/legacyfs/online/159284_6qv_good no selections.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This First Note chart appears to work fine until I start making selections on Account Note Type, in particular the selection of "Account Note", then it breaks.&amp;nbsp; I should see the number of notes in the First Note chart as I do in the Accounts Worked chart, but that is not always the case, as seen below.&amp;nbsp; I would like it to pull out the Account Notes from the raw data.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="159285" alt="6qv_bad if account note type selected.PNG" class="jive-image image-2" src="/legacyfs/online/159285_6qv_bad if account note type selected.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some key pieces of the First Note chart:&lt;/P&gt;&lt;P&gt;(1) I'm using this &lt;SPAN style="text-decoration: underline;"&gt;calculated dimension with a Pick() statement&lt;/SPAN&gt; where I'm trying to assign priortiy in terms of how to define what notes make it to the First Note chart. &lt;/P&gt;&lt;P&gt;I'm either not tackling this the right way altogether, or my very last item for AcctNoteFlag is not doing what I think it should be doing.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(ExcludeNoteFlag='No',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pick(Dim2, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GuarNoteFlag, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InsFuNoteFlag, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IncNoteFlag, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SLineNoteFlag,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Aggr(count(distinct{$&amp;lt;[Account Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}[Account Note Type]), [Account Note User], [Account Note Date], [Guarantor Account])=1 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; AND Aggr(min({$&amp;lt;[Account Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}GuarNoteFlag), [Account Note User], [Account Note Date], [Guarantor Account])&amp;lt;&amp;gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; AND IsNull(Aggr(min({$&amp;lt;[Account Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}IncidentNotePriority), [Account Note User], [Account Note Date], [Guarantor Account])), AcctNoteFlag)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(2) Then I'm using &lt;SPAN style="text-decoration: underline;"&gt;Dimension Limits&lt;/SPAN&gt; on the field using the Pick() above and restricting to the First 1.&lt;/P&gt;&lt;P&gt;(3) My expressions are then using &lt;SPAN style="text-decoration: underline;"&gt;FirstSortedValue()&lt;/SPAN&gt; based on the Account Note Time in order to get the first note of the day based on the requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is my qvw which shows the raw data of course, but also shows the 3 charts in the images above.&amp;nbsp; Any help on this would be super, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Kris Markee (attached qvw)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 14:20:41 GMT</pubDate>
    <dc:creator>kdmarkee</dc:creator>
    <dc:date>2017-04-06T14:20:41Z</dc:date>
    <item>
      <title>Help needed with Pick() function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-needed-with-Pick-function/m-p/1355877#M516811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on some messy requirements primarily involving different granularity and Account Note Type, I am trying to get the first note of the day (First Note chart, shown below).&amp;nbsp; Counts from the First Note Chart will match up with the total count of the 2 charts below it.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="159284" alt="6qv_good no selections.PNG" class="jive-image image-1" src="/legacyfs/online/159284_6qv_good no selections.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This First Note chart appears to work fine until I start making selections on Account Note Type, in particular the selection of "Account Note", then it breaks.&amp;nbsp; I should see the number of notes in the First Note chart as I do in the Accounts Worked chart, but that is not always the case, as seen below.&amp;nbsp; I would like it to pull out the Account Notes from the raw data.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="159285" alt="6qv_bad if account note type selected.PNG" class="jive-image image-2" src="/legacyfs/online/159285_6qv_bad if account note type selected.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some key pieces of the First Note chart:&lt;/P&gt;&lt;P&gt;(1) I'm using this &lt;SPAN style="text-decoration: underline;"&gt;calculated dimension with a Pick() statement&lt;/SPAN&gt; where I'm trying to assign priortiy in terms of how to define what notes make it to the First Note chart. &lt;/P&gt;&lt;P&gt;I'm either not tackling this the right way altogether, or my very last item for AcctNoteFlag is not doing what I think it should be doing.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(ExcludeNoteFlag='No',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pick(Dim2, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GuarNoteFlag, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InsFuNoteFlag, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IncNoteFlag, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SLineNoteFlag,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Aggr(count(distinct{$&amp;lt;[Account Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}[Account Note Type]), [Account Note User], [Account Note Date], [Guarantor Account])=1 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; AND Aggr(min({$&amp;lt;[Account Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}GuarNoteFlag), [Account Note User], [Account Note Date], [Guarantor Account])&amp;lt;&amp;gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; AND IsNull(Aggr(min({$&amp;lt;[Account Note Date]={"$(= '&amp;gt;=' &amp;amp; vNoteStartDate) $(= '&amp;lt;=' &amp;amp; vNoteEndDate)"},[ExcludeNoteFlag]={'No'}&amp;gt;}IncidentNotePriority), [Account Note User], [Account Note Date], [Guarantor Account])), AcctNoteFlag)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(2) Then I'm using &lt;SPAN style="text-decoration: underline;"&gt;Dimension Limits&lt;/SPAN&gt; on the field using the Pick() above and restricting to the First 1.&lt;/P&gt;&lt;P&gt;(3) My expressions are then using &lt;SPAN style="text-decoration: underline;"&gt;FirstSortedValue()&lt;/SPAN&gt; based on the Account Note Time in order to get the first note of the day based on the requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is my qvw which shows the raw data of course, but also shows the 3 charts in the images above.&amp;nbsp; Any help on this would be super, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Kris Markee (attached qvw)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 14:20:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-needed-with-Pick-function/m-p/1355877#M516811</guid>
      <dc:creator>kdmarkee</dc:creator>
      <dc:date>2017-04-06T14:20:41Z</dc:date>
    </item>
  </channel>
</rss>

