<?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: Confusing set analysis behavior. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925943#M320445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the following set analysis &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=sum({$*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;lt;Dimension={'A'}&amp;gt; }Measure)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 14:22:02 GMT</pubDate>
    <dc:creator>ramoncova06</dc:creator>
    <dc:date>2015-09-10T14:22:02Z</dc:date>
    <item>
      <title>Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925941#M320443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello folks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's consider the following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dimension, Measure&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose we want to calculate the sum of "Measure" for dimension A using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Dimension={'A'}&amp;gt;}Measure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works OK and calculates the expected value of 2 only if there are no other dimensions selected. However, if we select dimension B the value is still 2 even when we told the formula to take into account the current selection by using the dollar sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we use the IF() function instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(If(Dimension='A', Measure))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula correctly displays 2 or 0&amp;nbsp; depending on the selected &lt;SPAN style="font-size: 13.3333330154419px;"&gt;dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to get the desired behavior using set analysis instead of IF()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925941#M320443</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2015-09-10T14:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925942#M320444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove set analysis form your expression&lt;/P&gt;&lt;P&gt;Sum(&lt;SPAN style="text-decoration: line-through;"&gt;{$&amp;lt;Dimension={'A'}&amp;gt;}&lt;/SPAN&gt;Measure)&lt;/P&gt;&lt;P&gt;and add Dimension as a dimension&amp;nbsp; in a straight table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:19:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925942#M320444</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-10T14:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925943#M320445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the following set analysis &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=sum({$*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;lt;Dimension={'A'}&amp;gt; }Measure)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925943#M320445</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-09-10T14:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925944#M320446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramón.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, your suggestion worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925944#M320446</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2015-09-10T14:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925945#M320447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's a simple explanation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set expression explicitly selects &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dimension={'A'}, so making selections in Dimension will be overridden by tyeh set expression. The $ sign means use the current selections for everything else. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The If() does not change the selections in any way, so if you select B, then the expression will return 0. This is all by design and predictable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925945#M320447</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-10T14:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925946#M320448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sasidhar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, your suggestion works but I need to display the value on a texbox, not a straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925946#M320448</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2015-09-10T14:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925947#M320449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very clear explanation, thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925947#M320449</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2015-09-10T14:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925948#M320450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this attachment. I think set analysis is not required. You can select any value from&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98554_Capture.PNG" style="height: auto;" /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dimension&lt;/EM&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:37:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925948#M320450</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-10T14:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing set analysis behavior.</title>
      <link>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925949#M320451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could consider loading the Dimension into two columns and use the second column in your set expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LET HidePrefix = '_';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Test:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD Dimension,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimension as _Dimension,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Measure&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; INLINE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Dimension, Measure&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; A, 1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; A, 0&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; A, 1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; B, 1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; B, 0&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Sum ({$&amp;lt;_Dimension={'A'}&amp;gt;} Measure)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Confusing-set-analysis-behavior/m-p/925949#M320451</guid>
      <dc:creator>johanlindell</dc:creator>
      <dc:date>2015-09-10T14:52:13Z</dc:date>
    </item>
  </channel>
</rss>

