<?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: Qlik Sense Loop With Conditions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987230#M81584</link>
    <description>&lt;P&gt;Hi Deepan....&lt;BR /&gt;Just some feedback.&amp;nbsp; Tried the first solution, didn't like this.&lt;BR /&gt;Have amended the second solution...&lt;BR /&gt;Became&lt;BR /&gt;TableName:&lt;BR /&gt;Load&lt;BR /&gt;ID&lt;BR /&gt;ShiftCode&lt;/P&gt;
&lt;P&gt;Max (Date) as MaxDate,&lt;/P&gt;
&lt;P&gt;Min(Date) as MinDate&lt;BR /&gt;Resident Table&lt;/P&gt;
&lt;P&gt;Where Shfitcode ='F'&lt;BR /&gt;Group by ID, ShiftCode;&lt;BR /&gt;This gives me the min and max dates where the shift is 'F' for all ID's.&amp;nbsp; Will try and work out first solution in a minute.&lt;BR /&gt;Would like to ignore when you have a symbol.&amp;nbsp; So just ignore the shift totally is where I want to be.&lt;BR /&gt;So Id No 1 would be 4 and Id no2 would be 2.&lt;BR /&gt;Does that explain it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2022 16:26:39 GMT</pubDate>
    <dc:creator>hermanitor</dc:creator>
    <dc:date>2022-09-29T16:26:39Z</dc:date>
    <item>
      <title>Qlik Sense Loop With Conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987190#M81580</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;
&lt;P&gt;I have a table that looks like this...and I want to do a few things here....&lt;BR /&gt;Firstly I want to identify the minimum and maximum date where an F appears.&lt;/P&gt;
&lt;P&gt;Then I then also want to count the number of consecutive F shifts...and just for an extras twist where there is an '/' this is defined as not working.&amp;nbsp; In other words ID 1 has worked 4 consecutive F shifts.&amp;nbsp; ID 2 has only worked 2 as the ES shift is a different shift type....&lt;BR /&gt;Does this make sense?&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;ID&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Date&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Shift&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;01/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;02/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;03/10/21&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;/&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;04/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;05/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;01/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;02/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;ES&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;03/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;04/10/21&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;F&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 15:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987190#M81580</guid>
      <dc:creator>hermanitor</dc:creator>
      <dc:date>2022-09-29T15:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Loop With Conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987213#M81581</link>
      <description>&lt;P&gt;Maybe it could work like this, you need to create different if and else condition for getting the final output.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for first min and max use the following condition;&lt;/P&gt;
&lt;P&gt;if(Shift ='F', Max(Date)) as MaxDate If (SHift = 'F', Min (Date)) as&amp;nbsp; minDate&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;
&lt;P&gt;shift ,&lt;/P&gt;
&lt;P&gt;Max (Date) as MaxDate,&lt;/P&gt;
&lt;P&gt;Min(Date) as MinDate&lt;/P&gt;
&lt;P&gt;Resident Table&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Group by Shift;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way you can get max date for each shift.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For second, are you ignoring the / and considering the shift as continuous or not?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 16:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987213#M81581</guid>
      <dc:creator>deepanshuSh</dc:creator>
      <dc:date>2022-09-29T16:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Loop With Conditions</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987230#M81584</link>
      <description>&lt;P&gt;Hi Deepan....&lt;BR /&gt;Just some feedback.&amp;nbsp; Tried the first solution, didn't like this.&lt;BR /&gt;Have amended the second solution...&lt;BR /&gt;Became&lt;BR /&gt;TableName:&lt;BR /&gt;Load&lt;BR /&gt;ID&lt;BR /&gt;ShiftCode&lt;/P&gt;
&lt;P&gt;Max (Date) as MaxDate,&lt;/P&gt;
&lt;P&gt;Min(Date) as MinDate&lt;BR /&gt;Resident Table&lt;/P&gt;
&lt;P&gt;Where Shfitcode ='F'&lt;BR /&gt;Group by ID, ShiftCode;&lt;BR /&gt;This gives me the min and max dates where the shift is 'F' for all ID's.&amp;nbsp; Will try and work out first solution in a minute.&lt;BR /&gt;Would like to ignore when you have a symbol.&amp;nbsp; So just ignore the shift totally is where I want to be.&lt;BR /&gt;So Id No 1 would be 4 and Id no2 would be 2.&lt;BR /&gt;Does that explain it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 16:26:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Loop-With-Conditions/m-p/1987230#M81584</guid>
      <dc:creator>hermanitor</dc:creator>
      <dc:date>2022-09-29T16:26:39Z</dc:date>
    </item>
  </channel>
</rss>

