<?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 if condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/170964#M41168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramya,&lt;/P&gt;&lt;P&gt;The suggestion posted by John should work . if not use the hour function ie&lt;/P&gt;&lt;P&gt;if(Hour(HOUR)&amp;gt;=9 and Hour(HOUR)&amp;lt;=17,'Working','Non Working').&lt;/P&gt;&lt;P&gt;if not just write in the script Hour(HOUR) AS Hours and use the Hours column for calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chakravarthy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Jan 2011 18:04:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-15T18:04:51Z</dc:date>
    <item>
      <title>if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/170961#M41165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have date fields day and usage.&lt;/P&gt;&lt;P&gt;I need to have a filter say "time" where the filter value has to be "working" and "nonworking" , values , when i click on working , the usage value has to be calculated for the hour between 9am - 5pm when i click on nonworking , the usage has to be calculated for 5pm-9am&lt;/P&gt;&lt;P&gt;How do i achive this?&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2011 02:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/170961#M41165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-15T02:34:47Z</dc:date>
    </item>
    <item>
      <title>if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/170962#M41166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll need a time of day field to calculate your new time field from. Assuming you have one, I suspect I'm missing an obvious and better way, but here's one possibility:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Times]:&lt;BR /&gt;LOAD&lt;BR /&gt; "time of day"&lt;BR /&gt;,if("time of day"&amp;gt;=maketime(9) and "time of day"&amp;lt;=maketime(17),'working','nonworking') as "time"&lt;BR /&gt;;&lt;BR /&gt;LOAD time(fieldvalue('time of day',iterno())) as "time of day"&lt;BR /&gt;AUTOGENERATE 1&lt;BR /&gt;WHILE len(fieldvalue('time of day',iterno()))&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Oh, right. One simple way is to make a list box with an expression instead of a field, and put in the "time" expression from above:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if("time of day"&amp;gt;=maketime(9) and "time of day"&amp;lt;=maketime(17),'working','nonworking')&lt;/P&gt;&lt;P&gt;You'll probably get significantly better performance by putting it in the script, though.&lt;/P&gt;&lt;P&gt;I still think I'm missing some easy and better way, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2011 02:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/170962#M41166</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-15T02:47:21Z</dc:date>
    </item>
    <item>
      <title>if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/170963#M41167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the response , but it does not work for me when i give the expression in the list box just nonworking is displaying ..&lt;/P&gt;&lt;P&gt;I Have created a list box with " working" and "nonworking" values in it and named it timeframe,&lt;/P&gt;&lt;P&gt;I have a field in my table called HOUR which has 24 hour timeframe , that mean i have values 1-24 in it , so when a user selects "working" from the timeframe filter usage( to display usage i have a graph with certain dimensions and expressions) for the hours 9 am to 5pm has to be displayed , that mean i have to see 9-17 numbers in the hour filter as higlighted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2011 07:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/170963#M41167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-15T07:43:41Z</dc:date>
    </item>
    <item>
      <title>if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/170964#M41168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramya,&lt;/P&gt;&lt;P&gt;The suggestion posted by John should work . if not use the hour function ie&lt;/P&gt;&lt;P&gt;if(Hour(HOUR)&amp;gt;=9 and Hour(HOUR)&amp;lt;=17,'Working','Non Working').&lt;/P&gt;&lt;P&gt;if not just write in the script Hour(HOUR) AS Hours and use the Hours column for calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chakravarthy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2011 18:04:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/170964#M41168</guid>
      <dc:creator />
      <dc:date>2011-01-15T18:04:51Z</dc:date>
    </item>
  </channel>
</rss>

