<?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 If in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Count-If/m-p/1568837#M456863</link>
    <description>&lt;P&gt;Please help, I am struggling with trying to get a daily count based on this formula I am using in a separate table chart. I need to count the number of Yes and No in a selected time period:&amp;nbsp;&lt;BR /&gt;=if((Interval([Actual Time]/24, 'hh:mm:ss'))-(Interval(LunchDesignation/24,'hh:mm'))&amp;gt;.0006944,'No','Yes')&lt;/P&gt;&lt;P&gt;This issue is that the data for lunch in the data set includes all breaks, so I have to find that breaks over 27 minutes, as there are people who take different lunch periods (30min, 45min, and 60min). I am thinking I can do this in set analysis with a count if, but I cannot seem to get it figured out. I attached my sample data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this that I did in Excel, count the number of Yes and No&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Excel Example" style="width: 952px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10111iC3F82770D65D1178/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Excel Example" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Excel Example&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2019 15:05:04 GMT</pubDate>
    <dc:creator>diannefrost</dc:creator>
    <dc:date>2019-04-12T15:05:04Z</dc:date>
    <item>
      <title>Set Analysis Count If</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Count-If/m-p/1568837#M456863</link>
      <description>&lt;P&gt;Please help, I am struggling with trying to get a daily count based on this formula I am using in a separate table chart. I need to count the number of Yes and No in a selected time period:&amp;nbsp;&lt;BR /&gt;=if((Interval([Actual Time]/24, 'hh:mm:ss'))-(Interval(LunchDesignation/24,'hh:mm'))&amp;gt;.0006944,'No','Yes')&lt;/P&gt;&lt;P&gt;This issue is that the data for lunch in the data set includes all breaks, so I have to find that breaks over 27 minutes, as there are people who take different lunch periods (30min, 45min, and 60min). I am thinking I can do this in set analysis with a count if, but I cannot seem to get it figured out. I attached my sample data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this that I did in Excel, count the number of Yes and No&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Excel Example" style="width: 952px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10111iC3F82770D65D1178/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Excel Example" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Excel Example&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 15:05:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Count-If/m-p/1568837#M456863</guid>
      <dc:creator>diannefrost</dc:creator>
      <dc:date>2019-04-12T15:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Count If</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Count-If/m-p/1568895#M456864</link>
      <description>&lt;P&gt;I figured it out. I took it in steps, created a variable for lunch vLunch=([Actual Activity]='Break' AND [Actual Time]&amp;gt;=0.42&lt;/P&gt;&lt;P&gt;and a variable for lunch period vLunchPeriod=(Interval([Actual Time]/24, 'hh:mm:ss'))-(Interval(LunchDesignation/24,'hh:mm'))&lt;/P&gt;&lt;P&gt;Then on my graph:&lt;/P&gt;&lt;P&gt;Yes=count(DISTINCT if($(vLunch) AND $(vLunchPeriod)&amp;lt;.0006944,MetricDate))&lt;/P&gt;&lt;P&gt;No=count(DISTINCT if($(vLunch) AND $(vLunchPeriod)&amp;gt;.0006944,MetricDate))&lt;/P&gt;&lt;P&gt;and the counts work&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 846px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10118iBECD465CCFE20EAA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 18:41:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Count-If/m-p/1568895#M456864</guid>
      <dc:creator>diannefrost</dc:creator>
      <dc:date>2019-04-12T18:41:34Z</dc:date>
    </item>
  </channel>
</rss>

