<?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: Expression with two filters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768827#M273071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count( {&amp;lt;HeartbeatType={'500'}&amp;gt;+&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Crash={'Fatal'}&lt;/SPAN&gt;&amp;gt;} DISTINCT EventID )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Marc.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2015 16:46:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-09T16:46:58Z</dc:date>
    <item>
      <title>Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768823#M273067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking to create an expression that does something like this:&lt;/P&gt;&lt;P&gt;Count distinct Heartbeat on devices that have also produced CRASH during same timeperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not understanding how to count it since the crash and the heartbeat come in different records. My table includes the following columns:&lt;/P&gt;&lt;P&gt;Time/Date&lt;/P&gt;&lt;P&gt;EventID&lt;/P&gt;&lt;P&gt;Heartbeat&lt;/P&gt;&lt;P&gt;Crash&lt;/P&gt;&lt;P&gt;DeviceID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expressions can be:&lt;/P&gt;&lt;P&gt;= Count( {&amp;lt;LogTime=$::LogTime,HeartbeatType={500}&amp;gt;} DISTINCT EventID )&amp;nbsp;&amp;nbsp; &amp;lt;-- Just count heartbeats&lt;/P&gt;&lt;P&gt;= Count( {&amp;lt;LogTime=$::LogTime,Crash={Fatal}&amp;gt;} DISTINCT DeviceID )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- Just count devices that generate crash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I want to put those two together to only count the heartbeats on devices that have also generated crashes during that time period:&lt;/P&gt;&lt;P&gt;= Count( {&amp;lt;LogTime=$::LogTime,HeartbeatType={500},DeviceID{&amp;lt;LogTime=$::LogTime,Crash={Fatal}&amp;gt;}&amp;gt;} DISTINCT EventID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously this doesn't work! Appreciate the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 15:54:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768823#M273067</guid>
      <dc:creator />
      <dc:date>2015-03-09T15:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768824#M273068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jessica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, if you want to count Heartbeats:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count( {&amp;lt;HeartbeatType={'500'}&amp;gt;} DISTINCT EventID )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Please share a qvw to further work on this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Marc.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 16:18:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768824#M273068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-09T16:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768825#M273069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; Count( {&amp;lt;LogTime=$::LogTime,HeartbeatType={500},Crash={Fatal}&amp;gt;}&amp;gt;} DISTINCT EventID ) should do it - You just don't need to repeat the log time again as you have already done that peice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hope it helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Rupert&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 16:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768825#M273069</guid>
      <dc:creator>Roop</dc:creator>
      <dc:date>2015-03-09T16:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768826#M273070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that each record has either CRASH or HEARTBEAT values set. They do not have both! So, I need to count the events that have the heartbeat, but only where the device ID matches different events where the crash has occurred. Since they are separate events, I can't include them in the same (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;HeartbeatType={500},Crash={Fatal}) because the count is 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 16:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768826#M273070</guid>
      <dc:creator />
      <dc:date>2015-03-09T16:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768827#M273071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count( {&amp;lt;HeartbeatType={'500'}&amp;gt;+&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Crash={'Fatal'}&lt;/SPAN&gt;&amp;gt;} DISTINCT EventID )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Marc.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 16:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768827#M273071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-09T16:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768828#M273072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once again, this is not what I want because the eventID is not same for the event producing the crash and the event producing the heartbeat. I am trying to find where the device ID is the same. Here is the sample data, to hopefully make it more clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LogTime&amp;nbsp;&amp;nbsp;&amp;nbsp; EventID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeviceID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Heartbeat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Crash&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1:00pm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EventA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Device1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - &lt;/P&gt;&lt;P&gt;2:00pm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EventB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Device2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - &lt;/P&gt;&lt;P&gt;3:00pm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EventC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Device1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fatal&lt;/P&gt;&lt;P&gt;4:00pm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EventD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Device1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, I only want to count the 2 heartbeats from Device1 because Device1 is the only device that produced a crash. I need to make sure I don't count the heartbeat that was triggered by Device2 because it has not produced a crash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 17:25:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768828#M273072</guid>
      <dc:creator />
      <dc:date>2015-03-09T17:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with two filters</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768829#M273073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, i understand now. i would try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count( {&amp;lt;HeartbeatType={'500'}, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DeviceID&lt;/SPAN&gt;=p({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Crash={'Fatal'}&lt;/SPAN&gt;&amp;gt;} DeviceID)&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;} DISTINCT EventID )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 17:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-two-filters/m-p/768829#M273073</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-09T17:33:12Z</dc:date>
    </item>
  </channel>
</rss>

