<?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 Expression help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443198#M817518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've taken on a few dashboards and I am trying to understand some of the expressions.&amp;nbsp; Would anyone be able to explain in simple terms what these expressions are actually doing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD Sales:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Average intake:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)/(date#(today())-date#($(vYrStart)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Predicted YTD:&lt;/P&gt;&lt;P&gt;=(sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)/(date#(today())-date#($(vYrStart))))*365&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Av intake req:&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}TARGET)-sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES))/(365 - (date#(today())-date#($(vYrStart))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FINMONTH = , FINYEAR = {'$(=max(FINYEAR))'}, CAL_MONTH_STR=&amp;gt;}TARGET)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443198#M817518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've taken on a few dashboards and I am trying to understand some of the expressions.&amp;nbsp; Would anyone be able to explain in simple terms what these expressions are actually doing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD Sales:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Average intake:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)/(date#(today())-date#($(vYrStart)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Predicted YTD:&lt;/P&gt;&lt;P&gt;=(sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)/(date#(today())-date#($(vYrStart))))*365&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Av intake req:&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}TARGET)-sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES))/(365 - (date#(today())-date#($(vYrStart))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FINMONTH = , FINYEAR = {'$(=max(FINYEAR))'}, CAL_MONTH_STR=&amp;gt;}TARGET)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&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-help/m-p/1443198#M817518</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443199#M817519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD Sales:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a Sum of SALES with the following criteria&lt;/P&gt;&lt;P&gt;FINYEAR is the maximum FINYEAR (taking into account your current selections)&lt;/P&gt;&lt;P&gt;FINMONTH is greater than max(FINMONTH) minus max FINMONTH (which is completely pointless as it will always be zero!) and is less than 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Average intake:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)/(date#(today())-date#($(vYrStart)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is YTD Sales, but divided by today() minus the variable vYrStart, so I would expect thias to return an average daily figure here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Predicted YTD:&lt;/P&gt;&lt;P&gt;=(sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES)/(date#(today())-date#($(vYrStart))))*365&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Average intage multiplied by 365 to project a figure for the whole year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Av intake req:&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}TARGET)-sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH = {'&amp;gt;$(=max(FINMONTH)-max(FINMONTH)) &amp;lt;= 12'}&amp;gt;}SALES))/(365 - (date#(today())-date#($(vYrStart))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This the difference between YTD Sales and Predicted YTD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FINMONTH = , FINYEAR = {'$(=max(FINYEAR))'}, CAL_MONTH_STR=&amp;gt;}TARGET)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is simply a SUM of TARGET for the current FNYEAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 10:18:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443199#M817519</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2017-09-06T10:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443200#M817520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to advise how I can get a networkdays calculation for the average intake?&amp;nbsp; This will then allow me to do more accurate reporting as orders are not received on weekends etc.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 10:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443200#M817520</guid>
      <dc:creator />
      <dc:date>2017-09-06T10:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443201#M817521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure here but you *may* have an issue with your Average Intake, Predicted YTD, and Av Intake Req if you were to select a prior FINYEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD Sales will correctly return the result for the FINYEAR selected, however your divisor may be incorrect,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because of the (date#(today())-date#($(vYrStart)) calculation. today() will evaluate to 6th September 2017, and I presume vYrStart will evaluate to the year start of the selected FINYEAR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 10:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443201#M817521</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2017-09-06T10:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443202#M817522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, based on the above expression, which as noted I believe is flawed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Average Intake would be something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FINYEAR = {'$(=max(FINYEAR))'}, FINMONTH= &amp;gt;}SALES)/&lt;/P&gt;&lt;P&gt;networkdays(date#($(vYrStart)), (date#(today()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have simplified the FINMONTH part, as I am assuming that you have no FINMONTHs below zero or above 12, so basically we can ignore selections in that field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I have divided by Networkdays between today and whatever is being returned by your vYrStart variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 10:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443202#M817522</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2017-09-06T10:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443203#M817523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to create a few variables and it's now working much better &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; thanks for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 13:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1443203#M817523</guid>
      <dc:creator />
      <dc:date>2017-09-06T13:54:17Z</dc:date>
    </item>
  </channel>
</rss>

