<?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: How to add an expression using a date variable in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116739#M758462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or second option for you is use direct expression like below into your chart expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression =&lt;STRONG&gt;$(=maxstring(%Expression))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2018 06:49:44 GMT</pubDate>
    <dc:creator>ahmar811</dc:creator>
    <dc:date>2018-08-24T06:49:44Z</dc:date>
    <item>
      <title>How to add an expression using a date variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116737#M758460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; font-family: 'Arial',sans-serif; color: #222222; background: #F5F6F5;"&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Hi Everyone, I'm new to QlikView and am having a little trouble modifying a report built by the previous person. We have an ad hoc report that allows the user to pick the dimension fields and the calculated fields displayed in the&lt;/SPAN&gt; &lt;/SPAN&gt;straight table. The calculated fields are defined in the script with an Expression table. What I trying to do is add a new calculated field that calculates DSO based on selections (start and end date) made in an input box. My problem is finding the correct syntax for the expression using the date variables (if that is even possible).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; font-family: 'Arial',sans-serif; color: #222222; background: #F5F6F5;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background: #F5F6F5; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;The user will select the desired dimensions and calculated fields the generate the report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG alt="qlikview.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/211644_qlikview.png" style="height: 134px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression is defined in the script using a Expression table:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qv2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/211645_qv2.png" style="height: 160px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;The problem is when I add this expression the check box for DSO disappears from the List Box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Round(Sum(if({&amp;lt;Ending Date = ('$(vEndDateRange)', EndingAmount,0))/Sum(if({Invoice Date &amp;gt; ('$(vStateDateRange)' and {Invoice&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date} &amp;lt; ('$(vEndDateRange)', {Invoice Amount}, 0)) * (('$(vEndDateRange)'-('$(vStateDateRange)')&lt;/P&gt;&lt;P&gt;Does anyone have an idea how I can make this work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116737#M758460</guid>
      <dc:creator>mludolph</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an expression using a date variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116738#M758461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;Create one variable for that expression like below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vExpression=MaxString(%Expression)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and use in table expression like below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(vExpression)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also find attached qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ahmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 06:37:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116738#M758461</guid>
      <dc:creator>ahmar811</dc:creator>
      <dc:date>2018-08-24T06:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an expression using a date variable in the script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116739#M758462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or second option for you is use direct expression like below into your chart expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression =&lt;STRONG&gt;$(=maxstring(%Expression))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 06:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-an-expression-using-a-date-variable-in-the-script/m-p/116739#M758462</guid>
      <dc:creator>ahmar811</dc:creator>
      <dc:date>2018-08-24T06:49:44Z</dc:date>
    </item>
  </channel>
</rss>

