<?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 Expressions help in script editor in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585845#M443216</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm new to Qlikview. My question is about data loading and expression building:&lt;/P&gt;&lt;P&gt;I'm getting an errror that I'm missing right parenthesis but i don't think it is it. cant find what is wrong&lt;/P&gt;&lt;P&gt;I'm trying to subtract 1 month from a character based date, i.e. 201904 minus 1 month = 3/1/2019 (Control Date)&lt;/P&gt;&lt;P&gt;this is what i'm doing: wondering if there is a better way? are long if statements allowed in the editor? what is wrong with my statement?&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;BR /&gt;T.CCYYMM AS LOAN_CCYYMM,&lt;BR /&gt;&lt;STRONG&gt;if(right(LOAN_CCYYMM,2)='01',date(left(LOAN_CCYYMM,4)-1,12,1),date(left(LOAN_CCYYMM,4),right(LOAN_CCYYMM,2)-1,1)) as CONTROL_DATE,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 21:48:11 GMT</pubDate>
    <dc:creator>shehovsovi</dc:creator>
    <dc:date>2019-05-28T21:48:11Z</dc:date>
    <item>
      <title>Expressions help in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585845#M443216</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm new to Qlikview. My question is about data loading and expression building:&lt;/P&gt;&lt;P&gt;I'm getting an errror that I'm missing right parenthesis but i don't think it is it. cant find what is wrong&lt;/P&gt;&lt;P&gt;I'm trying to subtract 1 month from a character based date, i.e. 201904 minus 1 month = 3/1/2019 (Control Date)&lt;/P&gt;&lt;P&gt;this is what i'm doing: wondering if there is a better way? are long if statements allowed in the editor? what is wrong with my statement?&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;BR /&gt;T.CCYYMM AS LOAN_CCYYMM,&lt;BR /&gt;&lt;STRONG&gt;if(right(LOAN_CCYYMM,2)='01',date(left(LOAN_CCYYMM,4)-1,12,1),date(left(LOAN_CCYYMM,4),right(LOAN_CCYYMM,2)-1,1)) as CONTROL_DATE,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 21:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585845#M443216</guid>
      <dc:creator>shehovsovi</dc:creator>
      <dc:date>2019-05-28T21:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions help in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585864#M443219</link>
      <description>Trying to break down your logic&lt;BR /&gt;if(&lt;BR /&gt;right(LOAN_CCYYMM,2)='01', // then ..&lt;BR /&gt;date(left(LOAN_CCYYMM,4)-1,12,1), // else ..  ???? The date function only has 2 parameters  date(number[, format])&lt;BR /&gt;date(left(LOAN_CCYYMM,4),&lt;BR /&gt;right(LOAN_CCYYMM,2)-1,1)) as CONTROL_DATE,</description>
      <pubDate>Wed, 29 May 2019 01:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585864#M443219</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2019-05-29T01:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions help in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585934#M443223</link>
      <description>you are using QLIK Syntax in SQL. Try like this:&lt;BR /&gt;&lt;BR /&gt;Load *,&lt;BR /&gt;if(right(LOAN_CCYYMM,2)='01',date(left(LOAN_CCYYMM,4)-1,12,1),date(left(LOAN_CCYYMM,4),right(LOAN_CCYYMM,2)-1,1)) as CONTROL_DATE&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt;T.CCYYMM AS LOAN_CCYYMM,&lt;BR /&gt;..&lt;BR /&gt;;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 May 2019 06:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1585934#M443223</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-05-29T06:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions help in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1586282#M443233</link>
      <description>&lt;P&gt;I'm using LOAN_CCYYMM in my calculation. I get this field from a database through SQL loading. Shouldn't I first load the field before I can use it in calc in order of operations?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 14:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1586282#M443233</guid>
      <dc:creator>shehovsovi</dc:creator>
      <dc:date>2019-05-29T14:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions help in script editor</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1586286#M443234</link>
      <description>&lt;P&gt;i had a formula in Excel which i'm trying to replicate in Qlikview.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to calculate number of days delinquent between two dates. First I'm creating a control date and then will be using control date to subtract another date. So result would be something like 30,60,90 days&lt;BR /&gt;LOAN_CCYYMM is a text field ie 201904. I'm trying to create a new field from that by subtracting 1 month from 04 and then converting the result to date: i.e 3/1/2019&lt;/P&gt;&lt;P&gt;Is there a better way to do what i'm trying to do?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 14:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-help-in-script-editor/m-p/1586286#M443234</guid>
      <dc:creator>shehovsovi</dc:creator>
      <dc:date>2019-05-29T14:57:39Z</dc:date>
    </item>
  </channel>
</rss>

