<?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: Aggregate Calculation Based on Value Inclusion in Smaller Set in a Sheet Expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggregate-Calculation-Based-on-Value-Inclusion-in-Smaller-Set-in/m-p/1677843#M51539</link>
    <description>&lt;P&gt;If you need just a total for all the CurrentUserIdentifier values, use:&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;count&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Identifiers&lt;SPAN class="s2"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;CurrentUserIdentifiers&lt;SPAN class="s2"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;DISTINCT&lt;/SPAN&gt; D2&lt;SPAN class="s2"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;If you need to count perCurrentUserIdentifier I recommend loading "CurrentUserIdentifier as Identifiers"&amp;nbsp; to create a link.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2020 23:41:25 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2020-02-20T23:41:25Z</dc:date>
    <item>
      <title>Aggregate Calculation Based on Value Inclusion in Smaller Set in a Sheet Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-Calculation-Based-on-Value-Inclusion-in-Smaller-Set-in/m-p/1677833#M51538</link>
      <description>&lt;P&gt;I am trying to find an expression to aggregate values based on a field in the values existence in another set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a user has multiple identifiers&lt;/LI&gt;&lt;LI&gt;I have a table of multiple users&lt;/LI&gt;&lt;LI&gt;I have a table of the identifiers related to my user&lt;/LI&gt;&lt;LI&gt;I have another table of identifiers&lt;/LI&gt;&lt;LI&gt;those identifiers link to ownership of a record.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I need to count the total distinct records belonging to my current user.&amp;nbsp; In the same application I need to get aggregates across the rest of the data so I do not want to use a filter or section access to restrict the data.&lt;/P&gt;&lt;P&gt;So basically I am looking&amp;nbsp; for something that will count distinct based on the intersection of a set with a smaller set.&amp;nbsp; More succinctly in SQL I would write Select count(distinct record) from record join owners where ownerIdentifier in (list of identifiers)&lt;/P&gt;&lt;P&gt;As example data say I have:&lt;/P&gt;&lt;TABLE border="1" width="50%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;STRONG&gt;CurrentUserIdentifiers&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;1111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;2222&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Identifiers&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;ValueDataId&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1111&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;12345&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1111&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;23456&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;2222&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;34567&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;2222&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;45678&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;3333&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;56789&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;ValueDataId&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;D1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;D2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;...&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;12345&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;qwer&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;poiu&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;23456&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;asdf&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;nmhj&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;34567&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;zxcv&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;hjkl&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;45678&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;bvcx&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;yuio&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;56789&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;gfds&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;trew&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I would like to count the distinct D2 values for the current user in a single expression, without limiting other available data.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:12:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-Calculation-Based-on-Value-Inclusion-in-Smaller-Set-in/m-p/1677833#M51538</guid>
      <dc:creator>johnmorgan</dc:creator>
      <dc:date>2024-11-16T03:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Calculation Based on Value Inclusion in Smaller Set in a Sheet Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-Calculation-Based-on-Value-Inclusion-in-Smaller-Set-in/m-p/1677843#M51539</link>
      <description>&lt;P&gt;If you need just a total for all the CurrentUserIdentifier values, use:&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;count&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Identifiers&lt;SPAN class="s2"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;P&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;CurrentUserIdentifiers&lt;SPAN class="s2"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;DISTINCT&lt;/SPAN&gt; D2&lt;SPAN class="s2"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;If you need to count perCurrentUserIdentifier I recommend loading "CurrentUserIdentifier as Identifiers"&amp;nbsp; to create a link.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 23:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-Calculation-Based-on-Value-Inclusion-in-Smaller-Set-in/m-p/1677843#M51539</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2020-02-20T23:41:25Z</dc:date>
    </item>
  </channel>
</rss>

