<?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 Test if it's in the possible values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216844#M70119</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;I have a graph where I have a dimension ("Categ").&lt;/P&gt;&lt;P&gt;This dimension has 2 values : "AAA" and "BBB". I have a list where I can select the "Categ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I select "AAA", I would like to display only the lines for "AAA".&lt;/P&gt;&lt;P&gt;This should be the normal behavior, but in my graph, I have column that use a "{1}" context.&lt;/P&gt;&lt;P&gt;Without selection :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1430_sourceID:1430" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With selection :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1431_sourceID:1431" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I want to change my dimension "Categ" to something like "if the current Categ is in the possible Categ regarding the current selection, then Categ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used a workaround with this formula :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;=if(substringCount(aggr(concat(DISTINCT Categ),Categ), Categ) &amp;gt; 0, Categ)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;but it's not "clean".&lt;/P&gt;&lt;P&gt;The result with the formula is OK :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1432_sourceID:1432" /&gt;&lt;/P&gt;&lt;P&gt;Is there another proper way ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Apr 2010 18:00:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-16T18:00:21Z</dc:date>
    <item>
      <title>Test if it's in the possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216844#M70119</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;I have a graph where I have a dimension ("Categ").&lt;/P&gt;&lt;P&gt;This dimension has 2 values : "AAA" and "BBB". I have a list where I can select the "Categ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I select "AAA", I would like to display only the lines for "AAA".&lt;/P&gt;&lt;P&gt;This should be the normal behavior, but in my graph, I have column that use a "{1}" context.&lt;/P&gt;&lt;P&gt;Without selection :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1430_sourceID:1430" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With selection :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1431_sourceID:1431" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I want to change my dimension "Categ" to something like "if the current Categ is in the possible Categ regarding the current selection, then Categ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used a workaround with this formula :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;=if(substringCount(aggr(concat(DISTINCT Categ),Categ), Categ) &amp;gt; 0, Categ)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;but it's not "clean".&lt;/P&gt;&lt;P&gt;The result with the formula is OK :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1432_sourceID:1432" /&gt;&lt;/P&gt;&lt;P&gt;Is there another proper way ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 18:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216844#M70119</guid>
      <dc:creator />
      <dc:date>2010-04-16T18:00:21Z</dc:date>
    </item>
    <item>
      <title>Test if it's in the possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216845#M70120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simpler dimension approach:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = aggr(Categ,Categ)&lt;BR /&gt;Expressions = same as you have&lt;/P&gt;&lt;P&gt;But my impression based on some very minor testing is that calculated dimensions are rather slow. So I suspect that a more efficient approach would be this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = Categ&lt;BR /&gt;Expressions = sum(Value)&lt;BR /&gt; &lt;STRONG&gt;if(len(Categ),&lt;/STRONG&gt;sum({1} Total &amp;lt;Categ&amp;gt; Value)&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;if(len(Categ),&lt;/STRONG&gt;sum({1} Total Value)&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 19:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216845#M70120</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-16T19:40:21Z</dc:date>
    </item>
    <item>
      <title>Test if it's in the possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216846#M70121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are on version 9, I'd recommend continue using Set Analysis and add a condition that Categ is one of the possible values. Instead of just {1}, your set analysis condition would look like:&lt;/P&gt;&lt;P&gt;{1 &amp;lt; Categ=P(Categ) &amp;gt; }&lt;/P&gt;&lt;P&gt;See attached example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Apr 2010 16:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216846#M70121</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-04-17T16:41:35Z</dc:date>
    </item>
    <item>
      <title>Test if it's in the possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216847#M70122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the solutions you suggested work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 09:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Test-if-it-s-in-the-possible-values/m-p/216847#M70122</guid>
      <dc:creator />
      <dc:date>2010-04-19T09:26:03Z</dc:date>
    </item>
  </channel>
</rss>

