<?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 Finding count with two conditions from associated tables. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1827792#M68152</link>
    <description>&lt;P&gt;I am attempting to create a graph for a app I created. The graph will display the amount of orders we have received that have a difference in its printed a recieved date &amp;lt;=2 as well if these orders contain the 'PANEL_IDS' 4000 or 9209.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the statements:&lt;/P&gt;&lt;P&gt;Count(Distinct ACC_ID)&lt;/P&gt;&lt;P&gt;IF(WILDMATCH(PANELS.PANEL_ID, ''4000,'9209'), ACC_ID)&lt;/P&gt;&lt;P&gt;IF(INTERVAL(DATE(Printed_date, 'MM/DD/yyyy') - DATE(Received_date, 'MM/DD/yyyy'), 'DD')&amp;lt;=2, ACC_ID)&lt;/P&gt;&lt;P&gt;Both of these if conditions work separately however how do I combine them to make a count with 2 conditions.&lt;/P&gt;&lt;P&gt;Here was my attempt that has logic that makes sense to me but the code will not work, and the debugging in the expressions don't help me pinpoint the issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=Count(If(Interval(Date(Date#([PRINTED_DATE],'MM/DD/yyyy hh:mm:ss'),'MM/dd/yyyy') - Date(Date#([RECEIVED_DATE],'MM/dd/yyyy hh:mm:ss'),'MM/dd/yyyy'), 'DD' &amp;lt; =2, (WILDMATCH(PANELS.PANEL_ID, ''4000,'9209'), ACC_ID))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 16:38:41 GMT</pubDate>
    <dc:creator>Marcushenriquesk</dc:creator>
    <dc:date>2021-08-10T16:38:41Z</dc:date>
    <item>
      <title>Finding count with two conditions from associated tables.</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1827792#M68152</link>
      <description>&lt;P&gt;I am attempting to create a graph for a app I created. The graph will display the amount of orders we have received that have a difference in its printed a recieved date &amp;lt;=2 as well if these orders contain the 'PANEL_IDS' 4000 or 9209.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the statements:&lt;/P&gt;&lt;P&gt;Count(Distinct ACC_ID)&lt;/P&gt;&lt;P&gt;IF(WILDMATCH(PANELS.PANEL_ID, ''4000,'9209'), ACC_ID)&lt;/P&gt;&lt;P&gt;IF(INTERVAL(DATE(Printed_date, 'MM/DD/yyyy') - DATE(Received_date, 'MM/DD/yyyy'), 'DD')&amp;lt;=2, ACC_ID)&lt;/P&gt;&lt;P&gt;Both of these if conditions work separately however how do I combine them to make a count with 2 conditions.&lt;/P&gt;&lt;P&gt;Here was my attempt that has logic that makes sense to me but the code will not work, and the debugging in the expressions don't help me pinpoint the issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=Count(If(Interval(Date(Date#([PRINTED_DATE],'MM/DD/yyyy hh:mm:ss'),'MM/dd/yyyy') - Date(Date#([RECEIVED_DATE],'MM/dd/yyyy hh:mm:ss'),'MM/dd/yyyy'), 'DD' &amp;lt; =2, (WILDMATCH(PANELS.PANEL_ID, ''4000,'9209'), ACC_ID))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 16:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1827792#M68152</guid>
      <dc:creator>Marcushenriquesk</dc:creator>
      <dc:date>2021-08-10T16:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Finding count with two conditions from associated tables.</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1827842#M68159</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/146912"&gt;@Marcushenriquesk&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count(If(Interval(Date(Date#([PRINTED_DATE],'MM/DD/yyyy hh:mm:ss'),'MM/dd/yyyy') - Date(Date#([RECEIVED_DATE],'MM/dd/yyyy hh:mm:ss'),'MM/dd/yyyy'), 'DD' &amp;lt; =2 &lt;STRONG&gt;and&lt;/STRONG&gt; WILDMATCH(PANELS.PANEL_ID, '4000','9209'), ACC_ID))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 21:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1827842#M68159</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-08-10T21:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Finding count with two conditions from associated tables.</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1828040#M68186</link>
      <description>&lt;P&gt;It says AND is not a value. I found the solution myself&lt;/P&gt;&lt;P&gt;=Count(DISTINCT if(Interval(Date([PRINTED_DATE],'MM/dd/yyyy') - Date([RECEIVED_DATE],'MM/dd/yyyy'), 'DD') &amp;lt;= 2, IF(WildMatch(PANEL_ID, '4000', '9209'), ACC_ID)))&lt;/P&gt;&lt;P&gt;I found that if conditions are cascading, so if there are two if statements. You declare the count and to be distinct and create the first if statement the next if statement is comma separated but still within the paracentesis of the first if statement.&amp;nbsp; EXAMPLE, =Count(IF(CONDITION, IF(CONDITION, 'FIELD TO BE COUNTED')))&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 15:05:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-count-with-two-conditions-from-associated-tables/m-p/1828040#M68186</guid>
      <dc:creator>Marcushenriquesk</dc:creator>
      <dc:date>2021-08-11T15:05:04Z</dc:date>
    </item>
  </channel>
</rss>

