<?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 Convert SQL case statement to qlik sense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Convert-SQL-case-statement-to-qlik-sense/m-p/2085019#M88967</link>
    <description>&lt;P&gt;I have a scenario in SQL where i am using below case statements.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;count(distinct (case when ( (Reg_date between trunc(current_date-1,'MM') and current_date-1)) then con_id else null end)) New&lt;/STRONG&gt;,&lt;BR /&gt;&lt;STRONG&gt;count(distinct (case when ( (Reg_date between add_months(trunc(current_date-1,'MM'),-1) and add_months((current_date-1),-1))) then con_id else null end)) Old&lt;/STRONG&gt;,&lt;/P&gt;
&lt;P&gt;Can anyone please suggest what will be the replacement of these in Qliksense ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Jun 2023 07:30:12 GMT</pubDate>
    <dc:creator>Kaushik2020</dc:creator>
    <dc:date>2023-06-18T07:30:12Z</dc:date>
    <item>
      <title>Convert SQL case statement to qlik sense</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-SQL-case-statement-to-qlik-sense/m-p/2085019#M88967</link>
      <description>&lt;P&gt;I have a scenario in SQL where i am using below case statements.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;count(distinct (case when ( (Reg_date between trunc(current_date-1,'MM') and current_date-1)) then con_id else null end)) New&lt;/STRONG&gt;,&lt;BR /&gt;&lt;STRONG&gt;count(distinct (case when ( (Reg_date between add_months(trunc(current_date-1,'MM'),-1) and add_months((current_date-1),-1))) then con_id else null end)) Old&lt;/STRONG&gt;,&lt;/P&gt;
&lt;P&gt;Can anyone please suggest what will be the replacement of these in Qliksense ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jun 2023 07:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-SQL-case-statement-to-qlik-sense/m-p/2085019#M88967</guid>
      <dc:creator>Kaushik2020</dc:creator>
      <dc:date>2023-06-18T07:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL case statement to qlik sense</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-SQL-case-statement-to-qlik-sense/m-p/2085191#M88981</link>
      <description>&lt;P&gt;Let's see if I got this right this time. use monthstart, addmonths and today functions edit as needed if I didn't get it right. Also beware that Reg_date is formatted as a date otherwise use the date or date# functions.&lt;BR /&gt;&lt;BR /&gt;result:&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;count(distinct if(monthstart(today()-1) &amp;lt;= Reg_date and Reg_date &amp;lt;= today()-1, con_id)) as New,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;count(distinct if(monthstart(addmonths(today()-1,-1)) &amp;lt;= Reg_date and Reg_date &amp;lt;= addmonths(today()-1,-1), con_id)) as Old&lt;BR /&gt;Resident source_table;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 09:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-SQL-case-statement-to-qlik-sense/m-p/2085191#M88981</guid>
      <dc:creator>jonashertz</dc:creator>
      <dc:date>2023-06-19T09:19:29Z</dc:date>
    </item>
  </channel>
</rss>

