<?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 Add Table Column that Counts Records with Criteria According to Row Values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1545422#M39294</link>
    <description>&lt;P&gt;Hello, I have a table as per below and I wish to accomplish 2 changes:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Only for records with [Risk] value equal to black, records are always shown for "retired" [Status] selection even if "retired" [Status] not selected for.&amp;nbsp; For example, all black "retired" [Status] records are shown, but not the ones with "red" [Status] (as per record with strikethrough)&lt;/LI&gt;&lt;LI&gt;Add column ([New Desired Column] to show count of [Market] and [Risk] in table according to row [Market] and [Risk] values.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Please see example table below:&lt;/P&gt;&lt;P&gt;Market, Risk, Project Count, Status, New Desired Column&lt;BR /&gt;US, Black, 4, Active, 8&lt;BR /&gt;US, Black, 2, Active, 8&lt;BR /&gt;US, Black, 2, Retired, 8&lt;BR /&gt;US, Red, 3, Active, 1&lt;BR /&gt;&lt;STRIKE&gt;US, Red, 2, Retired (should not show this record)&lt;/STRIKE&gt;&lt;BR /&gt;CAN, Black, 2, Active, 2&lt;BR /&gt;CAN, Red, 3, Active, 3&lt;BR /&gt;Mexico, Red, 5, Active, 5&lt;/P&gt;&lt;P&gt;Could you help by providing the expression for the [New Desired Column] measurement?&lt;/P&gt;</description>
    <pubDate>Tue, 19 Feb 2019 16:24:34 GMT</pubDate>
    <dc:creator>Flint</dc:creator>
    <dc:date>2019-02-19T16:24:34Z</dc:date>
    <item>
      <title>Add Table Column that Counts Records with Criteria According to Row Values</title>
      <link>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1545422#M39294</link>
      <description>&lt;P&gt;Hello, I have a table as per below and I wish to accomplish 2 changes:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Only for records with [Risk] value equal to black, records are always shown for "retired" [Status] selection even if "retired" [Status] not selected for.&amp;nbsp; For example, all black "retired" [Status] records are shown, but not the ones with "red" [Status] (as per record with strikethrough)&lt;/LI&gt;&lt;LI&gt;Add column ([New Desired Column] to show count of [Market] and [Risk] in table according to row [Market] and [Risk] values.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Please see example table below:&lt;/P&gt;&lt;P&gt;Market, Risk, Project Count, Status, New Desired Column&lt;BR /&gt;US, Black, 4, Active, 8&lt;BR /&gt;US, Black, 2, Active, 8&lt;BR /&gt;US, Black, 2, Retired, 8&lt;BR /&gt;US, Red, 3, Active, 1&lt;BR /&gt;&lt;STRIKE&gt;US, Red, 2, Retired (should not show this record)&lt;/STRIKE&gt;&lt;BR /&gt;CAN, Black, 2, Active, 2&lt;BR /&gt;CAN, Red, 3, Active, 3&lt;BR /&gt;Mexico, Red, 5, Active, 5&lt;/P&gt;&lt;P&gt;Could you help by providing the expression for the [New Desired Column] measurement?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 16:24:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1545422#M39294</guid>
      <dc:creator>Flint</dc:creator>
      <dc:date>2019-02-19T16:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table Column that Counts Records with Criteria According to Row Values</title>
      <link>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1545433#M39295</link>
      <description>Your 4th row New column should be 3 right?&lt;BR /&gt;Quite did not understand your first requirement can you elaborate with an example from your data sample.&lt;BR /&gt;&lt;BR /&gt;You can try below expression for your 2nd requirement. Like using straight table add your&lt;BR /&gt;dimensions then your expr like&lt;BR /&gt;=Sum(TOTAL &amp;lt;Market, Risk&amp;gt; [Project Count])</description>
      <pubDate>Sat, 16 Feb 2019 16:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1545433#M39295</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-16T16:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table Column that Counts Records with Criteria According to Row Values</title>
      <link>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1546483#M39340</link>
      <description>&lt;P&gt;Hi Vishsaggi,&lt;/P&gt;&lt;P&gt;2) You solved my second question - thanks.&lt;/P&gt;&lt;P&gt;1) For my first one, I edited my original post to try and explain better.&amp;nbsp; To summarize, I wish to update the set analysis so that 'black' records with retired status are always shown even if retired status is not selected.&amp;nbsp; 'red' (or other) records with retired status will not be shown or summed if 'retired' status is not selected for.&amp;nbsp; Would also like to remove those records with 'N/A' (not black or red) risk.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 20:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1546483#M39340</guid>
      <dc:creator>Flint</dc:creator>
      <dc:date>2019-02-19T20:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add Table Column that Counts Records with Criteria According to Row Values</title>
      <link>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1548868#M39536</link>
      <description>&lt;P&gt;For anyone who is having a similar problem to always show selected field values irregardless of user selection, the measurement expression I ended up using for my first question is below (I also wanted to remove "N/A" risk):&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Status]=[Status]+{"Retired"},&lt;BR /&gt;[Risk]=[Risk]-{"N/A"}&amp;gt;}&lt;BR /&gt;total &amp;lt;[Market], [Risk]&amp;gt;&lt;BR /&gt;if( not([Risk]&amp;lt;&amp;gt;'Complete' and [Status]='Retired') ,[UniqueID]))&lt;/P&gt;&lt;P&gt;I am marking this as the solution as it fulfilled both question parts.&amp;nbsp; Hope this helps someone out there in the interverse.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 18:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-Table-Column-that-Counts-Records-with-Criteria-According-to/m-p/1548868#M39536</guid>
      <dc:creator>Flint</dc:creator>
      <dc:date>2019-02-25T18:37:31Z</dc:date>
    </item>
  </channel>
</rss>

