<?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 Set Analysis - count orders with two different load dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646675#M48219</link>
    <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I am trying to build a KPI to show the number of sales orders that have more than one Load Date, which we should never have multiple load dates per order.&lt;/P&gt;&lt;P&gt;Currently I have a report using the logic below, and it works, because I have SALES_ID as a dimension on the report. However, if I want to count the amount of order with multiple load dates, it is not working for the KPI object.&lt;/P&gt;&lt;P&gt;Sum(Aggr(Count(distinct [Load Date]),SALES_ID))&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Luiz&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:07:36 GMT</pubDate>
    <dc:creator>luizcdepaula</dc:creator>
    <dc:date>2024-11-16T04:07:36Z</dc:date>
    <item>
      <title>Set Analysis - count orders with two different load dates</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646675#M48219</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I am trying to build a KPI to show the number of sales orders that have more than one Load Date, which we should never have multiple load dates per order.&lt;/P&gt;&lt;P&gt;Currently I have a report using the logic below, and it works, because I have SALES_ID as a dimension on the report. However, if I want to count the amount of order with multiple load dates, it is not working for the KPI object.&lt;/P&gt;&lt;P&gt;Sum(Aggr(Count(distinct [Load Date]),SALES_ID))&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Luiz&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:07:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646675#M48219</guid>
      <dc:creator>luizcdepaula</dc:creator>
      <dc:date>2024-11-16T04:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - count orders with two different load dates</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646682#M48220</link>
      <description>&lt;P&gt;Hello Luizc,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try doing this:&lt;BR /&gt;Sum(Aggr(&lt;SPAN&gt;If(Count(DISTINCT [Load Date])&amp;gt;1, 1, 0), SALES_ID&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should generate the count of all such transactions since it will sum the number of 1's or 0's generated after a check for each individual transaction.&lt;/P&gt;&lt;P&gt;Basically you can should be able to combine this measure with any dimension you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if it works.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kind regards,&lt;/P&gt;&lt;P&gt;S.T.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 21:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646682#M48220</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2019-11-13T21:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - count orders with two different load dates</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646701#M48223</link>
      <description>&lt;P&gt;Hi Stoyan,&lt;/P&gt;&lt;P&gt;I believe your solution works. It seems simple but I could not get it right. I was using the logic below with the IF function in the wrong place, so it was still summing all distinct Load Dates, regardless of the Sales_ID.&lt;/P&gt;&lt;P&gt;If(Sum(Aggr(Count(distinct [Load Date]),SALES_ID))=1,0,Aggr(Count(distinct [Load Date]),SALES_ID))&lt;/P&gt;&lt;P&gt;Also, I came up with another set analysis that seems to work as well. I will just be able to verify when an order with multiple Load Dates comes into the system. Find my logic below&lt;/P&gt;&lt;P&gt;Count({&amp;lt;SALES_ID={"=Aggr(Count(distinct [Load Date]),SALES_ID)&amp;gt;1"}&amp;gt;}SALES_ID)&lt;/P&gt;&lt;P&gt;I will mark your solution as right as it worked as well.&lt;/P&gt;&lt;P&gt;Thank you for the quick response.&lt;/P&gt;&lt;P&gt;Luiz&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 21:40:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-count-orders-with-two-different-load-dates/m-p/1646701#M48223</guid>
      <dc:creator>luizcdepaula</dc:creator>
      <dc:date>2019-11-13T21:40:44Z</dc:date>
    </item>
  </channel>
</rss>

