<?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 Revenue between dates from text field (containing year-month) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645488#M447490</link>
    <description>&lt;P&gt;I like to sum the total between a certain year&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omzetmaand contains the value 2019-10 2019-09 etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following formula but it doesn't return anything&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;MakeDate(left(Omzetmaand,4), num(right(Omzetmaand,2))) = {"$(='&amp;gt;=' &amp;amp; AddYears(monthsstart(1,Today()), -1) &amp;amp; '&amp;lt;=' &amp;amp; monthsstart(1,Today()))"}&amp;gt;}Omzet&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 16:35:41 GMT</pubDate>
    <dc:creator>___</dc:creator>
    <dc:date>2019-11-11T16:35:41Z</dc:date>
    <item>
      <title>Revenue between dates from text field (containing year-month)</title>
      <link>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645488#M447490</link>
      <description>&lt;P&gt;I like to sum the total between a certain year&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omzetmaand contains the value 2019-10 2019-09 etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following formula but it doesn't return anything&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;MakeDate(left(Omzetmaand,4), num(right(Omzetmaand,2))) = {"$(='&amp;gt;=' &amp;amp; AddYears(monthsstart(1,Today()), -1) &amp;amp; '&amp;lt;=' &amp;amp; monthsstart(1,Today()))"}&amp;gt;}Omzet&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 16:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645488#M447490</guid>
      <dc:creator>___</dc:creator>
      <dc:date>2019-11-11T16:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue between dates from text field (containing year-month)</title>
      <link>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645502#M447492</link>
      <description>&lt;P&gt;How is&amp;nbsp;&lt;SPAN&gt;Omzetmaand&amp;nbsp;created in the script? Can you share the script where this is created?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 16:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645502#M447492</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-11T16:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue between dates from text field (containing year-month)</title>
      <link>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645516#M447494</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry to step in but I had already started the reply &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here is a bit of a highlight:&lt;/P&gt;&lt;P&gt;I think it's not possible to turn a non-numerical field into a numerical for the purpose of a set expression&lt;/P&gt;&lt;P&gt;Aka&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Num(TextField)={10}&amp;gt;} Value) will not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the usage of &amp;gt;, &amp;lt; operators in set expression you need to use a numeric field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a test data sample to show you how you can fix the issue:&lt;/P&gt;&lt;P&gt;TestData:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Values:
LOAD
	Text(DateField) as DateFieldText
,	Date(Date#(DateField, 'D-M-YYYY')) as DateFieldDate
,	Value
;
Load * INLINE [
DateField, Value
9-10-2019,100
3-8-2019,150
6-9-2019,200
15-10-2019,140
22-9-2019,80
17-9-2019,100
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Working expression:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=sum({&amp;lt;DateFieldDate={"&amp;gt;=$(=AddYears(Date(Date#('01/10/2018','DD/MM/YYYY')),1))"}&amp;gt;} Value)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not working expression:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=sum({&amp;lt;Date(Date#(DateFieldText, 'D-M-YYYY'))={"&amp;gt;=$(=AddYears(Date(Date#('01/10/2018','DD/MM/YYYY')),1))"}&amp;gt;} Value)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;S.T.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 17:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1645516#M447494</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2019-11-11T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Revenue between dates from text field (containing year-month)</title>
      <link>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1647045#M447584</link>
      <description>&lt;P&gt;Daniel, did Stoyan's post get you what you needed?&amp;nbsp; If so, do not forget to come back to the post and use the Accept as Solution button to give him credit for the help and let others know the explanation helped you get what you needed.&amp;nbsp; If you are still working on things, leave an update with what you need.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 14:35:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Revenue-between-dates-from-text-field-containing-year-month/m-p/1647045#M447584</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-11-14T14:35:09Z</dc:date>
    </item>
  </channel>
</rss>

