<?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 calculate % in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate/m-p/1414013#M427350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Let`s say you have the data into Qlikview as the attached excel file and let`s say that with the following script:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;// easier to deal dates when they are numbers in set analysis&lt;/P&gt;&lt;P&gt;Num(Date) as NumDate;&lt;/P&gt;&lt;P&gt;LOAD Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upper(Month) as Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#(Year&amp;amp;'-'&amp;amp;Month,'YYYY-MMM') as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Plan1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I load it up in qlikview.&lt;/P&gt;&lt;P&gt;The following expression would get what you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Month Value&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"$(=Num(MonthStart(Today())))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD Value&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"&amp;lt;=$(=Num(Today()))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Percentage&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"$(=Num(MonthStart(Today())))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"&amp;lt;=$(=Num(Today()))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And gives the following:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185434_Sample.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached QVW with the data and expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Dec 2017 19:23:10 GMT</pubDate>
    <dc:creator>felipedl</dc:creator>
    <dc:date>2017-12-01T19:23:10Z</dc:date>
    <item>
      <title>How to calculate %</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate/m-p/1414012#M427349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how do I calculate % by diving current month total with average of YTD? based on user selection for period&lt;/P&gt;&lt;P&gt;&lt;IMG alt="annual.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185442_annual.PNG" style="height: 311px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 17:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate/m-p/1414012#M427349</guid>
      <dc:creator>rmuhammad</dc:creator>
      <dc:date>2017-12-01T17:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate %</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate/m-p/1414013#M427350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Let`s say you have the data into Qlikview as the attached excel file and let`s say that with the following script:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;// easier to deal dates when they are numbers in set analysis&lt;/P&gt;&lt;P&gt;Num(Date) as NumDate;&lt;/P&gt;&lt;P&gt;LOAD Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upper(Month) as Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#(Year&amp;amp;'-'&amp;amp;Month,'YYYY-MMM') as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Plan1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I load it up in qlikview.&lt;/P&gt;&lt;P&gt;The following expression would get what you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Month Value&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"$(=Num(MonthStart(Today())))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD Value&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"&amp;lt;=$(=Num(Today()))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Percentage&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"$(=Num(MonthStart(Today())))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({&amp;lt;NumDate={"&amp;lt;=$(=Num(Today()))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And gives the following:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185434_Sample.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached QVW with the data and expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 19:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate/m-p/1414013#M427350</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2017-12-01T19:23:10Z</dc:date>
    </item>
  </channel>
</rss>

