<?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: Help Streamline and Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Streamline-and-Expression/m-p/1588861#M737882</link>
    <description>&lt;P&gt;There probably is, but for a more detailed response you will need to create a small sample qvw or qvf file with some representative data so that modifications can be tested.&lt;/P&gt;&lt;P&gt;Some tips:&lt;/P&gt;&lt;P&gt;This component&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;
		[Metric]={"Income"},
		[Year]  ={'$(=$(v_CurrentYear))'},
		[Month]	={"Jan"}
	&amp;gt;}[Actual]) +
SUM({&amp;lt;
		[Metric]={"Income"},
		[Year] = {'$(=$(v_CurrentYear))'},
		[Month]	={"Jan"}
	&amp;gt;}[Outlook])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could be replaced with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;
	Metric = {'Income'},
	Year = {$(v_CurrentYear)},
	Month] = {'Jan'}
&amp;gt;} RangeSum(Actual, Outlook))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are other places where you could do the same (same set expression). RangeSum() handles nulls and missing values correctly.&lt;/P&gt;&lt;P&gt;Use single quotes in set expressions for literals.&amp;nbsp; Use double quotes for search expressions. Use no quotes for simple numbers (like year). These may not matter on older versions of Qlik, but they do matter moving forward.&lt;/P&gt;&lt;P&gt;Avoiding unnecessary decoration (like fields in square brackets) makes expressions easier to read and maintain.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 08:07:02 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2019-06-06T08:07:02Z</dc:date>
    <item>
      <title>Help Streamline and Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Streamline-and-Expression/m-p/1588844#M737881</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;Fairly new to Qlik and managed to write quite a complex expression that works and returns the results I need however I am sure that there must be a way of maybe streamlining this expression or making it more efficient.&lt;/P&gt;&lt;P&gt;Please let me know if you have any suggestions on what can be done or feel free to amend accordingly. I have attached the Expression - I copied it into a word doc.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Streamline-and-Expression/m-p/1588844#M737881</guid>
      <dc:creator>Jthurston</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help Streamline and Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Streamline-and-Expression/m-p/1588861#M737882</link>
      <description>&lt;P&gt;There probably is, but for a more detailed response you will need to create a small sample qvw or qvf file with some representative data so that modifications can be tested.&lt;/P&gt;&lt;P&gt;Some tips:&lt;/P&gt;&lt;P&gt;This component&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;
		[Metric]={"Income"},
		[Year]  ={'$(=$(v_CurrentYear))'},
		[Month]	={"Jan"}
	&amp;gt;}[Actual]) +
SUM({&amp;lt;
		[Metric]={"Income"},
		[Year] = {'$(=$(v_CurrentYear))'},
		[Month]	={"Jan"}
	&amp;gt;}[Outlook])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could be replaced with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;
	Metric = {'Income'},
	Year = {$(v_CurrentYear)},
	Month] = {'Jan'}
&amp;gt;} RangeSum(Actual, Outlook))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are other places where you could do the same (same set expression). RangeSum() handles nulls and missing values correctly.&lt;/P&gt;&lt;P&gt;Use single quotes in set expressions for literals.&amp;nbsp; Use double quotes for search expressions. Use no quotes for simple numbers (like year). These may not matter on older versions of Qlik, but they do matter moving forward.&lt;/P&gt;&lt;P&gt;Avoiding unnecessary decoration (like fields in square brackets) makes expressions easier to read and maintain.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 08:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Streamline-and-Expression/m-p/1588861#M737882</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-06-06T08:07:02Z</dc:date>
    </item>
  </channel>
</rss>

