<?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: Case statement in Qlik in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2082885#M88781</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;
&lt;P&gt;=count({&amp;lt;new_exist_flag={'New'}, act_date={"&amp;gt;=$(=AddMonths(date(Today(), 'MM'), -12))&amp;lt;$(=date(Today(), 'MM'))"}&amp;gt;} DISTINCT co_id)&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2023 18:14:25 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2023-06-12T18:14:25Z</dc:date>
    <item>
      <title>Case statement in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2082741#M88771</link>
      <description>&lt;P&gt;I have below SQL statement which I am looking for an alternative in qlik sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;count(distinct (case when (new_exist_flag='New' and (act_date between trunc(current_date-12,'MM') and current_date-12)) then co_id else null end))&lt;/P&gt;
&lt;P&gt;I can use the count and distinct as part of Set expression from the UI.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so here i want to see a conversion of SQL statement -&amp;nbsp;&lt;STRONG&gt;case when (new_exist_flag='New' and (act_date between trunc(current_date-12,'MM') and current_date-12)) then co_id else null end&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;-&amp;gt; columns from table:&lt;/P&gt;
&lt;P&gt;new_exist_flag,&amp;nbsp;act_date,&amp;nbsp;co_id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 12:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2082741#M88771</guid>
      <dc:creator>Kaushik2020</dc:creator>
      <dc:date>2023-06-12T12:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2082885#M88781</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;
&lt;P&gt;=count({&amp;lt;new_exist_flag={'New'}, act_date={"&amp;gt;=$(=AddMonths(date(Today(), 'MM'), -12))&amp;lt;$(=date(Today(), 'MM'))"}&amp;gt;} DISTINCT co_id)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 18:14:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2082885#M88781</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2023-06-12T18:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2083063#M88792</link>
      <description>&lt;P&gt;thanks for the reply. it worked with a small change.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;~ Below shows previous month count. how we can modify this to qlik sense ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;count(distinct (case when ( (act_date between add_months(trunc(current_date-1,'MM'),-1) and add_months((current_date-1),-1))) then co_id else null end)) ,&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 06:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Case-statement-in-Qlik/m-p/2083063#M88792</guid>
      <dc:creator>Kaushik2020</dc:creator>
      <dc:date>2023-06-13T06:47:32Z</dc:date>
    </item>
  </channel>
</rss>

