<?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 Logic in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964268#M79482</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17937"&gt;@nihhalmca&lt;/a&gt;&amp;nbsp;Instead of Set Analysis, we can get this done in the script Editor itself something like below:&lt;/P&gt;
&lt;P&gt;Temp:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;"Order Number",&lt;BR /&gt;"Actual Date",&lt;BR /&gt;"Target Date",&lt;BR /&gt;Status&lt;BR /&gt;FROM [lib://Qlik Community Practice/Set Analysis Logic.xlsx]&lt;BR /&gt;(ooxml, embedded labels, header is 1 lines, table is Sheet1)&lt;/P&gt;
&lt;P&gt;where "Actual Date"="Target Date" and not isnull(Status);&lt;/P&gt;
&lt;P&gt;inner join (Temp)&lt;BR /&gt;Temp1:&lt;BR /&gt;Load "Order Number"&lt;BR /&gt;where total_count=1;&lt;/P&gt;
&lt;P&gt;Load count("Order Number") as total_count,&lt;BR /&gt;"Order Number"&lt;BR /&gt;Resident Temp&lt;BR /&gt;group by "Order Number";&lt;/P&gt;
&lt;P&gt;Exit Script;&lt;/P&gt;
&lt;P&gt;In the front end for the KPI: Count(distinct status)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sidhiq91_0-1659546904647.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85871iAFEA2A4132C32926/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sidhiq91_0-1659546904647.png" alt="sidhiq91_0-1659546904647.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 17:15:34 GMT</pubDate>
    <dc:creator>sidhiq91</dc:creator>
    <dc:date>2022-08-03T17:15:34Z</dc:date>
    <item>
      <title>Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964217#M79481</link>
      <description>&lt;P&gt;Hi All -&lt;/P&gt;
&lt;P&gt;Please assist to write set analysis logic. Attached document for detail explanation and sample data.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 15:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964217#M79481</guid>
      <dc:creator>nihhalmca</dc:creator>
      <dc:date>2022-08-03T15:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964268#M79482</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17937"&gt;@nihhalmca&lt;/a&gt;&amp;nbsp;Instead of Set Analysis, we can get this done in the script Editor itself something like below:&lt;/P&gt;
&lt;P&gt;Temp:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;"Order Number",&lt;BR /&gt;"Actual Date",&lt;BR /&gt;"Target Date",&lt;BR /&gt;Status&lt;BR /&gt;FROM [lib://Qlik Community Practice/Set Analysis Logic.xlsx]&lt;BR /&gt;(ooxml, embedded labels, header is 1 lines, table is Sheet1)&lt;/P&gt;
&lt;P&gt;where "Actual Date"="Target Date" and not isnull(Status);&lt;/P&gt;
&lt;P&gt;inner join (Temp)&lt;BR /&gt;Temp1:&lt;BR /&gt;Load "Order Number"&lt;BR /&gt;where total_count=1;&lt;/P&gt;
&lt;P&gt;Load count("Order Number") as total_count,&lt;BR /&gt;"Order Number"&lt;BR /&gt;Resident Temp&lt;BR /&gt;group by "Order Number";&lt;/P&gt;
&lt;P&gt;Exit Script;&lt;/P&gt;
&lt;P&gt;In the front end for the KPI: Count(distinct status)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sidhiq91_0-1659546904647.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85871iAFEA2A4132C32926/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sidhiq91_0-1659546904647.png" alt="sidhiq91_0-1659546904647.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 17:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964268#M79482</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-08-03T17:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964451#M79496</link>
      <description>&lt;P&gt;No sidhiq, actual scenario those columns coming from different tables. Need to perform more transformations so trying to achieve at front end with set analysis.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 05:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964451#M79496</guid>
      <dc:creator>nihhalmca</dc:creator>
      <dc:date>2022-08-04T05:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964463#M79497</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17937"&gt;@nihhalmca&lt;/a&gt;&amp;nbsp; then in that case below mentioned Set expression will resolve the issue.&lt;/P&gt;
&lt;P&gt;You can use it for KPI's and Detail table&lt;/P&gt;
&lt;P&gt;count({&amp;lt;[Order Number]={"=count([Order Number])=1"}, [Actual Date]=P([Target Date]), Status={'*'}&amp;gt;}Status)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 06:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964463#M79497</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-08-04T06:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964466#M79498</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17937"&gt;@nihhalmca&lt;/a&gt;&amp;nbsp; You can use below expression as a measure in the straight table:&lt;/P&gt;
&lt;P&gt;=only({&amp;lt;[Actual Date]=P([Target Date]), [Order Number]={"=count([Order Number])=1"}, Status={'*'}&amp;gt;}[Order Number])&lt;/P&gt;
&lt;P&gt;This should resolve the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 06:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964466#M79498</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-08-04T06:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964525#M79505</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6188"&gt;@sidhiq91&lt;/a&gt;&amp;nbsp; Thanks for response.&lt;/P&gt;
&lt;P&gt;Null is coming actual have to avoid it (removed single quotations for wildcard (*) in expression with quotations not working).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-08-04 142052.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85944iE3FEA0F861ED518B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-08-04 142052.png" alt="Screenshot 2022-08-04 142052.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 08:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964525#M79505</guid>
      <dc:creator>nihhalmca</dc:creator>
      <dc:date>2022-08-04T08:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964534#M79506</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17937"&gt;@nihhalmca&lt;/a&gt;&amp;nbsp; It perfectly worked fine for me. Please see the screen shot below. Or provide me some more real time data.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sidhiq91_0-1659602733751.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85942iD40791B2084C060A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sidhiq91_0-1659602733751.png" alt="sidhiq91_0-1659602733751.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sidhiq91_1-1659602809170.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85943i4C1B19DEF6E416BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sidhiq91_1-1659602809170.png" alt="sidhiq91_1-1659602809170.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 08:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964534#M79506</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-08-04T08:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964549#M79507</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6188"&gt;@sidhiq91&lt;/a&gt;&amp;nbsp; Anything wrong in expression ? Please see the screenshots. if I remove single quotation for * it include nulls. My version is Qlik Sense April 2020.&lt;/P&gt;
&lt;P&gt;With Single Quotations:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-08-04 144229.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85945iC7AD6573AE9DEE67/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-08-04 144229.png" alt="Screenshot 2022-08-04 144229.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Without Single Quotations:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-08-04 144351.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/85946i5A613E64E34794C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-08-04 144351.png" alt="Screenshot 2022-08-04 144351.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Sample Data I used:&lt;/P&gt;
&lt;P&gt;load * inline [&lt;BR /&gt;OrderNumber, ActualDate, TargetDate, Status&lt;BR /&gt;A123, 25-07-2022, 25-07-2022, Delivered,&lt;BR /&gt;B123, 26-07-2022, 25-07-2022, Delivered,&lt;BR /&gt;C123, 21-07-2022, 21-07-2022, Delivered,&lt;BR /&gt;D123, 22-07-2022, 22-07-2022, , &lt;BR /&gt;E123, 29-07-2022, 29-07-2022, Delivered,&lt;BR /&gt;E123, 29-07-2022, 29-07-2022, Returned ,&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 09:18:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964549#M79507</guid>
      <dc:creator>nihhalmca</dc:creator>
      <dc:date>2022-08-04T09:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964565#M79508</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17937"&gt;@nihhalmca&lt;/a&gt;&amp;nbsp;I am exactly not sure what is happening. I would rather suggest you to remove that part of the code in the set Analysis i.e.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Status={'*'}, because the it is going only non null values. so you should get the right result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For the Details table, in the dimension section uncheck&amp;nbsp;the include null values. Hope that should resolve your issues.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 10:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964565#M79508</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-08-04T10:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Logic</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964589#M79512</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6188"&gt;@sidhiq91&lt;/a&gt;&amp;nbsp; I used&amp;nbsp;Status={'Delivered'}. Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 10:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Logic/m-p/1964589#M79512</guid>
      <dc:creator>nihhalmca</dc:creator>
      <dc:date>2022-08-04T10:51:24Z</dc:date>
    </item>
  </channel>
</rss>

