<?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 Converting SQL CASE statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Converting-SQL-CASE-statement/m-p/460435#M1165638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to convert a SQL Statement into a QlikView compatible statement can anybody please help &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This currently calculates the number of Active employees at the end of a given period + the number of new starters in the period - the number of leavers in the period to give me the new balance of Active Employees&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'1901-01-01'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-06-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2999-12-31'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-06-30'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; [B/Fwd Active Employees (July)]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-31'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; [Employee Starters (July)]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-31'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; [Employee Leavers (July)]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'1901-01-01'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2999-12-31'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-31'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; [C/Fwd Active Employees (July)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from &lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am trying to convert this to achieve the same either through the script or directly in a number of chart expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Kind Regard&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Martyn &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2012 15:29:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-02T15:29:50Z</dc:date>
    <item>
      <title>Converting SQL CASE statement</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-SQL-CASE-statement/m-p/460435#M1165638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to convert a SQL Statement into a QlikView compatible statement can anybody please help &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This currently calculates the number of Active employees at the end of a given period + the number of new starters in the period - the number of leavers in the period to give me the new balance of Active Employees&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'1901-01-01'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-06-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2999-12-31'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-06-30'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; [B/Fwd Active Employees (July)]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-31'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; [Employee Starters (July)]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-31'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; [Employee Leavers (July)]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CASE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;WHEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;START_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'1901-01-01'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-01'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;And&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LEAVE_DATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2999-12-31'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;'2012-07-31'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; EMPLOYEE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;EMP_CODE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; [C/Fwd Active Employees (July)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from &lt;SPAN style="font-size: 10pt;"&gt;EMPLOYEE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am trying to convert this to achieve the same either through the script or directly in a number of chart expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Kind Regard&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Martyn &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 15:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-SQL-CASE-statement/m-p/460435#M1165638</guid>
      <dc:creator />
      <dc:date>2012-10-02T15:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting SQL CASE statement</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-SQL-CASE-statement/m-p/460436#M1165639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why can't you load the information into qlikview?&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;load *;&lt;/P&gt;&lt;P&gt;sql [your SQL statment];&lt;/P&gt;&lt;P&gt;that way, you can fo not need to worry about converting(maybe?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 19:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-SQL-CASE-statement/m-p/460436#M1165639</guid>
      <dc:creator>alexpanjhc</dc:creator>
      <dc:date>2012-10-02T19:51:45Z</dc:date>
    </item>
  </channel>
</rss>

