<?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: Expression Explanation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148100#M900239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From My Understanding, Day(Today()) returns total days completed in this month,&lt;/P&gt;&lt;P&gt;Lets take an example, Today's Date is 7/13/2016 Then Returns 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But In above scenario we need to calculate till date total, so we interpreting &lt;SPAN style="font-size: 13.3333px;"&gt;Day(Today())=1,Then it Returns 13.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;"=MonthStart(Today(),&lt;SPAN style="font-size: 13.3333px;"&gt;Day(Today())=1&lt;/SPAN&gt;)&lt;/SPAN&gt; " -&amp;gt; This expression is to calculate total from start of today's month to Today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you to get clear idea.@Dave Adlard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2016 11:29:10 GMT</pubDate>
    <dc:creator>manidhana90</dc:creator>
    <dc:date>2016-07-13T11:29:10Z</dc:date>
    <item>
      <title>Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148098#M900237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am pretty new to qlikview and somebody kindly helped me create an expressions that &lt;SPAN style="color: #000000;"&gt;returns a sum of bill value on the current month and for the full previous month on day one.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;The code is &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; s&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;um&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Bill Date]&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"&amp;gt;=$(=MonthStart(Today(),Day(Today())=1))"&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Bill Value] &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;I don’t really understand &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"&amp;gt;=$(=MonthStart(Today(),Day(Today())=1))"&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;I know the expression needs to be wrapped in {} and I guess the same applies for the “ after { and “ before }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;&amp;gt;= obviously means equal to or greater than and the $ prefixes all dates calculation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: black;"&gt;Can you explain the rest of the code is pseudo terms and how it decides to return the previous months data on day one - I know it does this because &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;Day(Today())=1) but how does it affects =MonthStart(Today(),Day(Today())=1))"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New';"&gt;}.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 10pt;"&gt;Your help would be much appreciated. Is there any free online training so I can learn how to write expressions properly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 10pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Times New Roman;"&gt;Dave&lt;/SPAN&gt;&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/Expression-Explanation/m-p/1148098#M900237</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148099#M900238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I understand, this -&amp;gt; &lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Day(Today())=1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;will give you -1 when true and 0 otherwise. So when we are at the first day of the month, expression will take you back to the 1st of last month. When you are any other date than 1st, it will take you to the 1st of this month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-1 means condition is true&lt;/P&gt;&lt;P&gt;0 means condition is false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So look at this as an invisible if statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Day(Today()) = 1, -1, 0)&lt;/STRONG&gt; is equivalent of &lt;STRONG&gt;Day(Today()) = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To further test this, try &lt;STRONG&gt;Day(Today()) = 1&lt;/STRONG&gt; in a text box object&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 11:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148099#M900238</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T11:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148100#M900239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From My Understanding, Day(Today()) returns total days completed in this month,&lt;/P&gt;&lt;P&gt;Lets take an example, Today's Date is 7/13/2016 Then Returns 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But In above scenario we need to calculate till date total, so we interpreting &lt;SPAN style="font-size: 13.3333px;"&gt;Day(Today())=1,Then it Returns 13.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;"=MonthStart(Today(),&lt;SPAN style="font-size: 13.3333px;"&gt;Day(Today())=1&lt;/SPAN&gt;)&lt;/SPAN&gt; " -&amp;gt; This expression is to calculate total from start of today's month to Today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you to get clear idea.@Dave Adlard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 11:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148100#M900239</guid>
      <dc:creator>manidhana90</dc:creator>
      <dc:date>2016-07-13T11:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148101#M900240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From My Understanding, Day(Today()) returns total days completed in this month,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Lets take an example, Today's Date is 7/13/2016 Then Returns 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;But In above scenario we need to calculate till date total, so we interpreting &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Day(Today())=1,Then it Returns 13.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;"=MonthStart(Today(),&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Day(Today())=1&lt;/SPAN&gt;)&lt;/SPAN&gt; " -&amp;gt; This expression is to calculate total from start of today's month to Today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I hope this helps you to get clear idea.@Dave Adlard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 11:31:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148101#M900240</guid>
      <dc:creator>manidhana90</dc:creator>
      <dc:date>2016-07-13T11:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148102#M900241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;got another one for you if that's OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is for last full month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: blue; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: maroon; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;[Bill Date]&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;={&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: maroon; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;"&amp;gt;= $(=monthstart(Monthend(today()+1,-1))) &amp;lt;=$(=monthend(today()+1,-1))"&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: maroon; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;[Bill Value]&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; line-height: 115%; font-family: 'Helvetica','sans-serif'; font-size: 8pt; mso-ansi-language: EN;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;&amp;nbsp; Again I am unsure of the +1, -1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;Is there not some sort of joiner between the month start and month end expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 12:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148102#M900241</guid>
      <dc:creator />
      <dc:date>2016-07-13T12:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148103#M900242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I understand, this is what this one is doing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's assume that Today is &lt;STRONG&gt;05/31/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Today() + 1 = 06/01/2016&lt;/P&gt;&lt;P&gt;MonthStart(Today() + 1, -1) = &lt;STRONG&gt;05/01/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MonthEnd(Today() + 1, -1) = &lt;STRONG&gt;05/31/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for 05/31/2016, the expression will return all data between 05/01/2016 and 05/31/2016 (this month's data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now let's assume that Today is infact today (07/13/2016)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Today() + 1 = 07/14/2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;MonthStart(Today() + 1, -1) = 06/01/2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;MonthEnd(Today() + 1, -1) = 06/30/2016&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So for 07/13/2016, the expression will return all data between 06/01/2016 and 06/30/2016 (last month's data)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;So basically if you are at the last day of the month, you will get the current month's data. If you are any date except the last date, you will get the data for last completed month.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I hope this will help clarify? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148103#M900242</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T14:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148104#M900243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect thanks so it adds a day but takes away a month so it does the Today()+1 functions first and adds a day because you are using Today and then does the monthstart -1. As the -1 is applied to monthstart it removes a month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my understanding correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148104#M900243</guid>
      <dc:creator />
      <dc:date>2016-07-13T14:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148105#M900244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you are absolutely right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Explanation/m-p/1148105#M900244</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T14:44:14Z</dc:date>
    </item>
  </channel>
</rss>

