<?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: Formula Improvement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1607196#M508287</link>
    <description>&lt;P&gt;If you are still searching for a solution, try the Design Blog area of Community as well, hundreds of how to and explanatory posts on different topics there that may be useful to you as well:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2019 19:43:07 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2019-07-29T19:43:07Z</dc:date>
    <item>
      <title>Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597323#M508281</link>
      <description>&lt;P&gt;I currently have a bar chart with the following formula:&lt;/P&gt;&lt;P&gt;=Num(&lt;BR /&gt;if (getselectedcount([~Period]) &amp;lt;&amp;gt; 0,&lt;BR /&gt;(if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Jan,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jan$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Feb,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Feb$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Mar,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Mar$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Apr,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Apr$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,May,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}May$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Jun,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jun$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Jul,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jul$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Aug,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Aug$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Sep,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Sep$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Oct,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Oct$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Nov,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Nov$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Dec,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Dec$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Q1,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jan$+Feb$+Mar$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Q2,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Apr$+May$+Jun$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Q3,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jul$+Aug$+Sep$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Q4,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Oct$+Nov$+Dec$), 0)),&lt;BR /&gt;(if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Jan,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jan$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Feb,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Feb$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Mar,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Mar$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Apr,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Apr$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,May,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}May$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Jun,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jun$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Jul,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Jul$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Aug,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Aug$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Sep,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Sep$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Oct,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Oct$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Nov,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Nov$), 0)+&lt;BR /&gt;if(wildmatch(','&amp;amp;Concat([~Period],',') &amp;amp; ',','*,Dec,*')=1, Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'}&amp;gt;}Dec$), 0)))&lt;BR /&gt;,'#,##0.00')&lt;/P&gt;&lt;P&gt;However, this chart takes a while to load. I believe it has to do with the multiple nested 'if' statements. If any one can help me improve this formula I would greatly appreciate it.&lt;/P&gt;&lt;P&gt;(It just returns the Applied Hours for the selected period (month or quarter). If none are selected, it shows all months.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 17:50:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597323#M508281</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-06-28T17:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597329#M508282</link>
      <description>&lt;P&gt;Check out the&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm" target="_self"&gt;P() Function&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will work better if you are using a calendar.&amp;nbsp; I'm not sure how you have the Jan$, Feb$ fields defined.&amp;nbsp; But using the P() function will return the rows that have the period selected or all rows if no period is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[~Data Classification(B)] = {'Applied Hrs'},[~Period]=P([~Period])&amp;gt;} AmtValue)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 19:01:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597329#M508282</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2019-06-28T19:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597330#M508283</link>
      <description>&lt;P&gt;One other thing, Qlik evaluates every possible outcome of the IF statement.&amp;nbsp; It assumes that at some time every outcome will occur, so it caches the results.&amp;nbsp; When possible, don't use an IF statement.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 19:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597330#M508283</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2019-06-28T19:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597834#M508284</link>
      <description>&lt;P&gt;Thanks for the help. Unfortunately I do not have a Period field with the months in it. Instead the values are listed as Jan$, Feb$, Mar$, etc. So each month is like its own separate field. Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 20:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597834#M508284</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-07-01T20:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597836#M508285</link>
      <description>&lt;P&gt;Actually, I do have a period field. But it is just for matching. For example, Period is Jan, Feb, Mar,.... and separately I have Jan$, Feb$, Mar$, ... all as separate fields. And I am not able to change the way this is set up as it is used in many other dashboards as well.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 20:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597836#M508285</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-07-01T20:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597838#M508286</link>
      <description>&lt;P&gt;Well if possible, using the&amp;nbsp;&lt;A href="http://help.qlik.com/en-US/sense/June2019/Subsystems/Hub/Content/Sense_Hub/LoadData/work-with-cross-tables.htm" target="_self"&gt;crosstable function&lt;/A&gt;&amp;nbsp;to change the table layout may make your life a lot easier.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 20:17:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1597838#M508286</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2019-07-01T20:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Improvement</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1607196#M508287</link>
      <description>&lt;P&gt;If you are still searching for a solution, try the Design Blog area of Community as well, hundreds of how to and explanatory posts on different topics there that may be useful to you as well:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 19:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Improvement/m-p/1607196#M508287</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-07-29T19:43:07Z</dc:date>
    </item>
  </channel>
</rss>

