<?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: Set Analysis Values change per selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029594#M1222324</link>
    <description>&lt;P&gt;Perfect. Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 21:28:45 GMT</pubDate>
    <dc:creator>qlikwiz123</dc:creator>
    <dc:date>2023-01-24T21:28:45Z</dc:date>
    <item>
      <title>Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029509#M1222313</link>
      <description>&lt;P&gt;I have three text boxes to show 3 different values.&lt;/P&gt;
&lt;P&gt;Field = Category&lt;/P&gt;
&lt;P&gt;Values = A,B,C&lt;/P&gt;
&lt;P&gt;Each text box has a set analysis to show A, B, C values respectively. But whenever a selection is made on 'Category', the other two values should turn 0 in the boxes and only the selected value box has to show a value. I solved it by writing an 'if' conditon for GetFieldSelections.&lt;/P&gt;
&lt;P&gt;But this is creating another problem. For example, when A is selected, the other two boxes show 0 but A shows 100 and not the actual value. Same with B and C. How do I show the&amp;nbsp; actual value even when a filter is applied on 'Category' field&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 17:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029509#M1222313</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2023-01-24T17:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029512#M1222314</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp;, you have 3 expressions like these : ?&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;Category = {'A'}&amp;gt;} Field)&lt;BR /&gt;sum({&amp;lt;Category = {'B'}&amp;gt;} Field)&lt;BR /&gt;sum({&amp;lt;Category = {'C'}&amp;gt;} Field)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 18:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029512#M1222314</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2023-01-24T18:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029514#M1222315</link>
      <description>&lt;P&gt;I have something like below.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TextBox A:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections(Category)='B' or&amp;nbsp;GetFieldSelections(Category)='C', '0',&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections(Category)='A',&amp;nbsp;&lt;SPAN&gt;sum({&amp;lt;Category = {'A'}&amp;gt;} Field),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;Category = {'A'}&amp;gt;} Field)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TextBox B:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections(Category)='A' or&amp;nbsp;GetFieldSelections(Category)='C', '0',&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections(Category)='B',&amp;nbsp;&lt;SPAN&gt;sum({&amp;lt;Category = {'B'}&amp;gt;} Field),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;Category = {'B'}&amp;gt;} Field)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TextBox C:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections(Category)='A' or&amp;nbsp;GetFieldSelections(Category)='A', '0',&lt;/P&gt;
&lt;P&gt;if(GetFieldSelections(Category)='C',&amp;nbsp;&lt;SPAN&gt;sum({&amp;lt;Category = {'C'}&amp;gt;} Field),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;Category = {'C'}&amp;gt;} Field)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way, whenever a selection is made on Category, only the selected value's box shows a value and other two boxes show 0. This part works but when a value is selected, that box shows 100 instead of original calculation.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 18:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029514#M1222315</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2023-01-24T18:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029544#M1222317</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp;, please check if this example is what are you looking for. It uses SubStringCount and&amp;nbsp;Concat functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;script:&lt;/P&gt;
&lt;P&gt;Load * INLINE [&lt;BR /&gt;Category, Field&lt;BR /&gt;A,1&lt;BR /&gt;B,1&lt;BR /&gt;C,2&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QFabian_1-1674588468118.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/98767i7A4FF12704C514C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="QFabian_1-1674588468118.png" alt="QFabian_1-1674588468118.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Textboxs expressions :&lt;/P&gt;
&lt;P&gt;=if(SubStringCount(Concat(Category, '|'), 'A') = 1, sum({&amp;lt;Category = {'A'}&amp;gt;} Field), 0)&lt;/P&gt;
&lt;P&gt;=if(SubStringCount(Concat(Category, '|'), 'B') = 1, sum({&amp;lt;Category = {'B'}&amp;gt;} Field), 0)&lt;/P&gt;
&lt;P&gt;=if(SubStringCount(Concat(Category, '|'), 'C') = 1, sum({&amp;lt;Category = {'C'}&amp;gt;} Field), 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SubStringCount&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/SubStringCount.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/SubStringCount.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Concat&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/ChartFunctions/StringAggregationFunctions/concat.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/ChartFunctions/StringAggregationFunctions/concat.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 19:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029544#M1222317</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2023-01-24T19:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029563#M1222319</link>
      <description>&lt;P&gt;Check the few changes in your formula, you must include set analysis in the divisor part of the formula too&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=if(SubStringCount(Concat(Category, '|'), 'A') = 1,((Count(Distinct {$&amp;lt;Category={'A'}&amp;gt;} Code)/&lt;BR /&gt;&lt;STRONG&gt;Count(Distinct {$&amp;lt;Category = &amp;gt;} Code)&lt;/STRONG&gt;)), 0)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 20:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029563#M1222319</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2023-01-24T20:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029572#M1222321</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121051"&gt;@QFabian&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens if I have multiple rows of the same categories (More than one A, B, C)? How do I make this dynamic instead of equaling it to 1?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 20:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029572#M1222321</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2023-01-24T20:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029573#M1222322</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp;, qlik works with aggregations (sum, count, avg) to aggregate data depending on selections, besides, expressions are evaluted row by row, then aggregate results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please change the formula : '= 1' to&lt;FONT color="#339966"&gt;&lt;STRONG&gt; '&amp;gt; 0'&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;=if(SubStringCount(Concat(Category, '|'), 'A') &lt;FONT color="#339966"&gt;&lt;STRONG&gt;&amp;gt; 0&lt;/STRONG&gt;&lt;/FONT&gt;, sum({&amp;lt;Category = {'A'}&amp;gt;} Field), 0)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 21:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029573#M1222322</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2023-01-24T21:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029579#M1222323</link>
      <description>&lt;P&gt;I will have new data added and the count of Category values A, B, C will not stay 1, making the above expression to fail. I am just wondering how to make this dynamic and make it work.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 21:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029579#M1222323</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2023-01-24T21:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Values change per selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029594#M1222324</link>
      <description>&lt;P&gt;Perfect. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 21:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Values-change-per-selection/m-p/2029594#M1222324</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2023-01-24T21:28:45Z</dc:date>
    </item>
  </channel>
</rss>

