<?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: if-condition in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293504#M872086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=COUNT((IF(Timestamp#([time:],'D + hh:mm:ss') &amp;gt;= Timestamp#('2 + 00:00:00','D + hh:mm:ss'),Articles)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Nov 2016 10:43:20 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2016-11-23T10:43:20Z</dc:date>
    <item>
      <title>if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293500#M872082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Hi all!&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I need some help with conditioning a calculation. I want to know how many distinct articles that have a delivery time greater than 2 days. My delivery time is formatted as “D + hh:mm:ss” and works well in other expressions. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;W&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;riting my expression as “if(time &amp;gt;=’2 + 00:00:00’, Count(DISTINCT(article),0)” does not work. It only shows the zero-value. What am I doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293500#M872082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293501#M872083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you paste some sample data please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 10:25:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293501#M872083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T10:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293502#M872084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Articles, time:&lt;/P&gt;&lt;P&gt;a, 2 + 00:00:00&lt;/P&gt;&lt;P&gt;b, 2 + 00:00:00&lt;/P&gt;&lt;P&gt;c, 3 + 00:00:00&lt;/P&gt;&lt;P&gt;b, 2 + 00:00:00&lt;/P&gt;&lt;P&gt;a, 3 + 00:00:00&lt;/P&gt;&lt;P&gt;b, 5 + 00:00:00&lt;/P&gt;&lt;P&gt;a, 1 + 00:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri;"&gt;The expression “if(time &amp;gt;=’2 + 00:00:00’, Count(DISTINCT(a),0)” should return "2", since two of the articles "a" have a time &amp;gt;=2, but it returns "0".&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 10:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293502#M872084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T10:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293503#M872085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;time&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'D + HH:MM:SS')&amp;gt;='2 + 00:00:00',&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Article&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),0) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 10:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293503#M872085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T10:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293504#M872086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=COUNT((IF(Timestamp#([time:],'D + hh:mm:ss') &amp;gt;= Timestamp#('2 + 00:00:00','D + hh:mm:ss'),Articles)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 10:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293504#M872086</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-11-23T10:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293505#M872087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charlotte, another option:&lt;/P&gt;&lt;P&gt;=If(SubField(time, ' + ', 1)&amp;gt;=2, &lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px;"&gt;Count(DISTINCT(article),0)&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and another one:&lt;/P&gt;&lt;P&gt;1.In the script create the field Days (or similar) like "&lt;SPAN style="font-size: 13.3333px;"&gt;SubField(time, ' + ', 1) as Days&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Then you can use this field in expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=If(Days&amp;gt;=2, &lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px;"&gt;Count(DISTINCT(article),0)&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;or maybe it should be: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Count(DISTINCT {&amp;lt;Days={"&amp;gt;=2"}&amp;gt;} article)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 10:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293505#M872087</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-23T10:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: if-condition in expression</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293506#M872088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;time&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'D + HH:MM:SS')&amp;gt;='2 + 00:00:00',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Articles&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 10:51:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-in-expression/m-p/1293506#M872088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T10:51:42Z</dc:date>
    </item>
  </channel>
</rss>

