<?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 Set analysis using multiple selections in one column to affect table contents in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150764#M504449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sally,&lt;/P&gt;&lt;P&gt;Using Oleg's Example as a base I also implemented the "GetFieldSelections" option to see what the difference would be. Here's what I found:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Both work exactly the same when there are selections made on the source field (FIELD2 in Oleg's example)&lt;/LI&gt;&lt;LI&gt;Using Concat, you can specify if you would like to enclose each element in quotes&lt;/LI&gt;&lt;LI&gt;Both options have the ability to specify the delimiter&lt;/LI&gt;&lt;LI&gt;The biggest difference is, using concat returns ALL field values when there is no selection made on the source field and using GetFieldSelections returns NO values when there are no selections made on the source field&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have attached a sample here for you to play with. I was interested in this question also, which is why I dug further into it. Go ahead and clear the selections on FIELD2 and you'll see what I am talking about.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sjprows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jul 2009 20:38:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-31T20:38:51Z</dc:date>
    <item>
      <title>Set analysis using multiple selections in one column to affect table contents</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150760#M504445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables, that are not joined (for a variety of reasons). They are:&lt;/P&gt;&lt;P&gt;PatientTable: PatientID, PatDiagCode&lt;/P&gt;&lt;P&gt;DiagTable: DiagCode, DiagDescription&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a listbox on DiagCode. I want to count PatientIDs of patients that have a PatDiagCode that matches what I've selected in DiagCode. I started with:&lt;/P&gt;&lt;P&gt;count( distinct { $&amp;lt;PatDiagCode= {$(=DiagCode)}&amp;gt;} PatientID)&lt;/P&gt;&lt;P&gt;But obviously that doesn't work (unless I've selected only 1 DiagCode). I've tried a number of different ways, but I can't seem to get it to work. I know, if all else fails, I can concatenate DiagCode into a variable, and use that as a list, but I'd really like to avoid that if possible.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 23:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150760#M504445</guid>
      <dc:creator />
      <dc:date>2009-07-30T23:36:01Z</dc:date>
    </item>
    <item>
      <title>Set analysis using multiple selections in one column to affect table contents</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150761#M504446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sally,&lt;/P&gt;&lt;P&gt;this can be solved with function concat() - you concatenate the selected values, enclosed in double quotes, and separated by a coma. The resulting list can be used in Set Analysis.&lt;/P&gt;&lt;P&gt;For some reason, I couldn't make the $-expansion work with concat() - could be something I'm missing in the syntax, so I had to use 2 variables in order to generate the list and pass it to Sales Analysis. There might be a more elegant solution...&lt;/P&gt;&lt;P&gt;See attached sample.&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 00:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150761#M504446</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-07-31T00:09:07Z</dc:date>
    </item>
    <item>
      <title>Set analysis using multiple selections in one column to affect table contents</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150762#M504447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sally,&lt;/P&gt;&lt;P&gt;Would something like this work?&lt;/P&gt;&lt;P&gt;Count( {$&amp;lt; PatDiagCode={$(=GetFieldSelections(DiagCode) )} &amp;gt;} DISTINCT PatientID)&lt;/P&gt;&lt;P&gt;This function only returns values when there are selections made. I hope this works for what you're doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sjprows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 04:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150762#M504447</guid>
      <dc:creator />
      <dc:date>2009-07-31T04:44:37Z</dc:date>
    </item>
    <item>
      <title>Set analysis using multiple selections in one column to affect table contents</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150763#M504448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg,&lt;/P&gt;&lt;P&gt;If you sneak a = into the dollar expansion it should work:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;FIELD1 = {$(=concat('"' &amp;amp; FIELD2 &amp;amp; '"', ',' ))} &amp;gt;} AMOUNT1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 09:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150763#M504448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-31T09:07:14Z</dc:date>
    </item>
    <item>
      <title>Set analysis using multiple selections in one column to affect table contents</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150764#M504449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sally,&lt;/P&gt;&lt;P&gt;Using Oleg's Example as a base I also implemented the "GetFieldSelections" option to see what the difference would be. Here's what I found:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Both work exactly the same when there are selections made on the source field (FIELD2 in Oleg's example)&lt;/LI&gt;&lt;LI&gt;Using Concat, you can specify if you would like to enclose each element in quotes&lt;/LI&gt;&lt;LI&gt;Both options have the ability to specify the delimiter&lt;/LI&gt;&lt;LI&gt;The biggest difference is, using concat returns ALL field values when there is no selection made on the source field and using GetFieldSelections returns NO values when there are no selections made on the source field&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have attached a sample here for you to play with. I was interested in this question also, which is why I dug further into it. Go ahead and clear the selections on FIELD2 and you'll see what I am talking about.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sjprows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 20:38:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150764#M504449</guid>
      <dc:creator />
      <dc:date>2009-07-31T20:38:51Z</dc:date>
    </item>
    <item>
      <title>Set analysis using multiple selections in one column to affect table contents</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150765#M504450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, guys. These are really great ideas.&lt;/P&gt;&lt;P&gt;sjprows -- I love GetFieldSelections. Now I'm itching to do something that uses that -- its so simple! Unfortunately, I don't actually "select" DiagCode -- I have the user select the diagnosis description, and therefore, this doesn't work for me. However Oleg/jsn's concat logic does work, even when DiagCode hasn't been directly selected.&lt;/P&gt;&lt;P&gt;This seems to do the trick. Thanks for the input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 21:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-multiple-selections-in-one-column-to-affect/m-p/150765#M504450</guid>
      <dc:creator />
      <dc:date>2009-07-31T21:41:20Z</dc:date>
    </item>
  </channel>
</rss>

