<?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, a field equal to selection field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196342#M504117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just started with set analysis ... so maybe the question is not really intelligent ...&lt;/P&gt;&lt;P&gt;The part &lt;I&gt;&lt;B&gt;{&amp;lt; sku.something = {$(=GetFieldSelections(other.something,',',50)} &amp;gt;}&lt;/B&gt;&lt;/I&gt; ... if other.something has 2 selected fields this means those fields will be used for sku.something?&lt;/P&gt;&lt;P&gt;It might be a solution ... for the time being ... but I hope to find a nicer way without the constraints of 50 max (or whatever number we take) ... the fields should simply be the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2009 22:05:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-12-23T22:05:52Z</dc:date>
    <item>
      <title>set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196340#M504115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some tables which have more fields which should be the same ...&lt;/P&gt;&lt;P&gt;e.g.&lt;BR /&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;I&gt;table1:&lt;/I&gt;&lt;BR /&gt;LOAD customerid,&lt;BR /&gt; sku.something,&lt;BR /&gt; ...&lt;BR /&gt;FROM ...&lt;BR /&gt;&lt;I&gt;table2:&lt;/I&gt;&lt;BR /&gt;LOAD customerid,&lt;BR /&gt; other.something,&lt;BR /&gt; ...&lt;BR /&gt;FROM ...&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Is there a way without merging the tables to set sku.something equal to the already selected other.something???&lt;/P&gt;&lt;P&gt;I tried some things with set analysis but did not find the trick.&lt;/P&gt;&lt;P&gt;{&amp;lt; sku.something = $(other.something) &amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 19:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196340#M504115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-23T19:58:33Z</dc:date>
    </item>
    <item>
      <title>set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196341#M504116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've fought with this yesterday,&lt;/P&gt;&lt;P&gt;I'm sure not It exists any easy solution :&lt;BR /&gt;in fact {&amp;lt; sku.something = {$(other.something)} &amp;gt;} will only work if you select exactly one value in other.something.&lt;/P&gt;&lt;P&gt;The GetFieldSelections (something like {&amp;lt; sku.something = {$(=GetFieldSelections(other.something,',',50)} &amp;gt;} will work if you select between 1 and 50 value of the other.selection (you can change the '50' value as you wish). multiple selections on other.something will works but not if there is no selection at all in other.something.&lt;/P&gt;&lt;P&gt;So the only way I found was to do something like&lt;/P&gt;&lt;P&gt;if( GetSelectedCount(other.something)&amp;gt;0,&lt;/P&gt;&lt;P&gt;....{&amp;lt; sku.something = {$(=GetFieldSelections(other.something,', ',50)} &amp;gt;} ....,&lt;/P&gt;&lt;P&gt;same expression without the sku.something = part. )&lt;/P&gt;&lt;P&gt;Not really efficient &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 21:43:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196341#M504116</guid>
      <dc:creator />
      <dc:date>2009-12-23T21:43:04Z</dc:date>
    </item>
    <item>
      <title>set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196342#M504117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just started with set analysis ... so maybe the question is not really intelligent ...&lt;/P&gt;&lt;P&gt;The part &lt;I&gt;&lt;B&gt;{&amp;lt; sku.something = {$(=GetFieldSelections(other.something,',',50)} &amp;gt;}&lt;/B&gt;&lt;/I&gt; ... if other.something has 2 selected fields this means those fields will be used for sku.something?&lt;/P&gt;&lt;P&gt;It might be a solution ... for the time being ... but I hope to find a nicer way without the constraints of 50 max (or whatever number we take) ... the fields should simply be the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 22:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196342#M504117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-23T22:05:52Z</dc:date>
    </item>
    <item>
      <title>set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196343#M504118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bertrand's suggestion is a good one. GetFieldSelections() is a very useful function.&lt;/P&gt;&lt;P&gt;Some other tips. You really don't need to provide any other details to the function: GetFieldSelections(FIELDNAME) will get you a comma delimited list of the selections in that field.&lt;/P&gt;&lt;P&gt;If you have a complicated dollar sign expansion [$(...)] then it may be easier to use a variable. Instead of&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt;sku.something = {$(=GetFieldSelections(other.something))}&amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum($(vVariableName) Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then define your variable as:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=if(GetSelectedCount(other.something)&amp;gt;0, {&amp;lt;sku.something = {$(=GetFieldSelections(other.something))}&amp;gt;})&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Putting the logic in your variable helps keep your chart expressions clean and it can be reused multiple times.&lt;/P&gt;&lt;P&gt;Now, you may run into trouble when your field selections are strings. Strings require quotes around each selection, but the standard GetFieldSelections only puts commas in between. Here you can expand on Bertrands suggestion to use the other parameters of the function. This should work for strings:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=if(GetSelectedCount(other.something)&amp;gt;0,&lt;BR /&gt;{&amp;lt;sku.something = {"$(=GetFieldSelections(other.something, Chr(34) &amp;amp; ',' &amp;amp; Chr(34)))"}&amp;gt;})&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 22:06:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196343#M504118</guid>
      <dc:creator />
      <dc:date>2009-12-23T22:06:40Z</dc:date>
    </item>
    <item>
      <title>set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196344#M504119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In all case that was a good question :).&lt;/P&gt;&lt;P&gt;I don't really know your needs but in my case, my aim is : I want to make selections on some fields on several sheets/objects but I don't want that selections to be applied to the full data model (because my selection may be useless or can create problems on some sheets). I think the true problem is I'm trying to use another logic than the QlikView native one (= all fieds are linked in the same functional perimeter). And I'm doing this because i'm tryning to reproduce an existing Dashboard (on a relational product) without adapting it to QlikView.&lt;BR /&gt;&lt;BR /&gt;So, personally, I will :&lt;/P&gt;&lt;P&gt;1) Join sku.something and other.something and explain the QlikView logic to my users.&lt;BR /&gt;2) Or create several qvw (1 by functional perimeter) and navigate in them with actions (External / Open QlikView Document with Transfert State Option).&lt;BR /&gt;3) Or create 2 different unlinked datamodel in the same qvw file.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Anyway good luck &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 22:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196344#M504119</guid>
      <dc:creator />
      <dc:date>2009-12-23T22:25:28Z</dc:date>
    </item>
    <item>
      <title>set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196345#M504120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We had the problem that the data with the 'something' selection was on was partly corrupt since the other 'something' was not selected at the same time which was needed for 2 of the 10 datapieces shown in our chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now we have a workable solution ... thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 22:29:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196345#M504120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-23T22:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis, a field equal to selection field?</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196346#M504121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case I have two different star schemes (global and supplier scheme). Both of the schemes contain two tables (CALENDER and SUPPLIER). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I wanted to do is a calculation in the global star scheme by applying the calender and supplier selections made in the supplier scheme.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the formula I used was :&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;&lt;/P&gt;&lt;P&gt;[$(=Concat({1}distinct $Field,']=,[')&amp;amp;']='),&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do not take in consideration other selections&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;&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;&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;&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;&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;&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;&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; // made in the global star scheme&lt;/P&gt;&lt;P&gt;YEAR=p(YEAR_SUPPLIER), MONTH=p(MONTH_SUPPLIER),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // YEAR equals all possible values of&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;&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;&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;&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;&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;&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;&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; // YEAR_SUPPLIER&lt;/P&gt;&lt;P&gt;NAMESUPPLIER=p(NAMESUPPLIER_SUPPLIER)&amp;gt;}&lt;/P&gt;&lt;P&gt;AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the p() function interesting because it takes in account all possible values. So if I select NAMESUPPLIER_SUPPLIER, my Sum will take into account :&lt;/P&gt;&lt;P&gt;- the YEAR_SUPPLIER selected by the user&lt;/P&gt;&lt;P&gt;- or all possible YEAR_SUPPLIER (white fields) if no selection has been made by the user.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 07:15:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-a-field-equal-to-selection-field/m-p/196346#M504121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-22T07:15:09Z</dc:date>
    </item>
  </channel>
</rss>

