<?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 with P() per row in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508239#M104469</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the same expression, I am getting correct result.&lt;/P&gt;
&lt;P&gt;Dimension; Key, Category&lt;/P&gt;
&lt;P&gt;Expression:&amp;nbsp;&lt;SPAN&gt;Count({&amp;lt;A_ID=P(B_ID)&amp;gt;} distinct A_ID)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrashantSangle_0-1741097218181.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178123iDB994EF3D1C2E5FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrashantSangle_0-1741097218181.png" alt="PrashantSangle_0-1741097218181.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2025 14:07:11 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2025-03-04T14:07:11Z</dc:date>
    <item>
      <title>Set analysis with P() per row</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508231#M104467</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have the following data:&lt;/P&gt;
&lt;P&gt;Table A:&lt;/P&gt;
&lt;P&gt;Key, A_ID&lt;/P&gt;
&lt;P&gt;A1, 123&lt;/P&gt;
&lt;P&gt;A1, 234&lt;/P&gt;
&lt;P&gt;A1, 345&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;Table B:&lt;/P&gt;
&lt;P&gt;Key, B_ID&lt;/P&gt;
&lt;P&gt;A1, 123&lt;/P&gt;
&lt;P&gt;A1, 234&lt;/P&gt;
&lt;P&gt;A1, 345&lt;/P&gt;
&lt;P&gt;A1, 789&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;I wanted to build a table in the front end and compare how many A_Ids are in common with the B_Ids.&lt;/P&gt;
&lt;P&gt;It worked with formula:&lt;/P&gt;
&lt;P&gt;Count({&amp;lt;A_ID=P(B_ID)&amp;gt;} distinct A_ID) and was giving result of 3 (all A_Ids found within the B_IDs).&lt;/P&gt;
&lt;P&gt;Now my Table A has additional field that I need to use in the front end:&lt;/P&gt;
&lt;P&gt;Table A:&lt;/P&gt;
&lt;P&gt;Key, A_ID, Category&lt;/P&gt;
&lt;P&gt;A1, 123, X&lt;/P&gt;
&lt;P&gt;A1, 234, X&lt;/P&gt;
&lt;P&gt;A1, 345, Y&lt;/P&gt;
&lt;P&gt;The previous formula doesnt work when I put Category as dimension to the straight table, as it looks on all possible B_Ids, not the ones matching the Category. It only gives the right result when 1 Category is filtered e.g. for X it will give then 2.&lt;/P&gt;
&lt;P&gt;How to modify the formula so that it looks on the Category level too?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 13:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508231#M104467</guid>
      <dc:creator>justalkak</dc:creator>
      <dc:date>2025-03-04T13:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with P() per row</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508239#M104469</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the same expression, I am getting correct result.&lt;/P&gt;
&lt;P&gt;Dimension; Key, Category&lt;/P&gt;
&lt;P&gt;Expression:&amp;nbsp;&lt;SPAN&gt;Count({&amp;lt;A_ID=P(B_ID)&amp;gt;} distinct A_ID)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PrashantSangle_0-1741097218181.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178123iDB994EF3D1C2E5FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PrashantSangle_0-1741097218181.png" alt="PrashantSangle_0-1741097218181.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 14:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508239#M104469</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2025-03-04T14:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with P() per row</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508243#M104471</link>
      <description>&lt;P&gt;In my data model it will show 3 next to X, and 2 only if I filter for X..&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 14:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508243#M104471</guid>
      <dc:creator>justalkak</dc:creator>
      <dc:date>2025-03-04T14:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with P() per row</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508282#M104486</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Count(DISTINCT&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Aggr(&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If(A_ID = P({&amp;lt;Category=P(Category)&amp;gt;} B_ID), A_ID),&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A_ID, Category&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 17:46:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508282#M104486</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-03-04T17:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with P() per row</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508586#M104543</link>
      <description>&lt;P&gt;Set analysis performs a column-level evaluation, like a selection. Therefore it's not possible to consider any conditions which needs a row-level evaluation. To compare anything against the row-level it requires an if-loop.&lt;/P&gt;
&lt;P&gt;Quite often it's very helpful to prepare such things already within the data-model, maybe just with an exists(Key) in the load.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 12:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-P-per-row/m-p/2508586#M104543</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-03-06T12:21:23Z</dc:date>
    </item>
  </channel>
</rss>

