<?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: Restrict Calculation based on Dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601316#M1109896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes add it under calculated dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you tried the next approach in the expression and you say it gave an error. What error? Did the expression syntax check say 'expression ok'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2014 10:15:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-05T10:15:20Z</dc:date>
    <item>
      <title>Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601313#M1109893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An application can have two products. e.g. Loan and Overdraft. The Follow Up Docs and Returned Docs should be blank in case of Overdraft but because of an application has loan and overdraft then the code calculates same time of loan for overdraft as attached. Can I restrict the code to only calculate if it is Loan or Masterplan under Follow Up Docs and Returned Docs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Tray={'NAPS Follow Up Docs'}&amp;gt;}fabs(interval(((Networkdays(Date(pre,'DD/MM/YYYY hh:mm:ss'),Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')) -2)*'$(vWorkDay)') &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(pre))&amp;lt;num('$(vQuitTime)'),if(frac(date(pre))&amp;gt;num('$(vStartTime)'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date(pre,'DD/MM/YYYY hh:mm:ss'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vStartTime)' ,'DD/MM/YYYYhh:mm:ss')),0) &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(CMP_Date))&amp;gt;num('$(vStartTime)'),if(frac(date(CMP_Date))&amp;lt;num('$(vQuitTime)'),(Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)','DD/MM/YYYYhh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),0), 'hh:mm:ss'))*24)/count({&amp;lt;Tray={'NAPS Follow Up Docs'}&amp;gt;}fabs(interval(((Networkdays(Date(pre,'DD/MM/YYYY hh:mm:ss'),Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')) -2)*'$(vWorkDay)') &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(pre))&amp;lt;num('$(vQuitTime)'),if(frac(date(pre))&amp;gt;num('$(vStartTime)'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date(pre,'DD/MM/YYYY hh:mm:ss'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vStartTime)' ,'DD/MM/YYYYhh:mm:ss')),0) &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(CMP_Date))&amp;gt;num('$(vStartTime)'),if(frac(date(CMP_Date))&amp;lt;num('$(vQuitTime)'),(Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)','DD/MM/YYYYhh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),0), 'hh:mm:ss'))*24)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601313#M1109893</guid>
      <dc:creator />
      <dc:date>2014-03-05T09:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601314#M1109894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I'm not mistaken, you can have that conditional in your dimension and your expression will inherit that condition upon calculation. (can't remember where I tested this, but give it a try and let me know &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: if(match(FollowUp,'Loan','MasterPlan')&amp;lt;&amp;gt;0 or match(ReturnedDoc,'Loan','MasterPlan)&amp;lt;&amp;gt;0,Application,null())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tick supress nulls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression should now exclude based on your dimension rules. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another approach would to have another IF statement encapsulate your current expression with the condition... So If(match(FollowUp,'Loan','MasterPlan')&amp;lt;&amp;gt;0 or match(ReturnedDoc,'Loan','MasterPlan)&amp;lt;&amp;gt;0,&lt;EM&gt;original expression)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you come right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:56:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601314#M1109894</guid>
      <dc:creator />
      <dc:date>2014-03-05T09:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601315#M1109895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Byron. Could you please tell where should I add the following under Add Calculated Dimension?&lt;BR /&gt;if(match(FollowUp,'Loan','MasterPlan')&amp;lt;&amp;gt;0 or match(ReturnedDoc,'Loan','MasterPlan)&amp;lt;&amp;gt;0,Application,null())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp; If(match(FollowUp,'Loan','MasterPlan')&amp;lt;&amp;gt;0 or match(ReturnedDoc,'Loan','MasterPlan)&amp;lt;&amp;gt;0,original expression) but it gives error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 10:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601315#M1109895</guid>
      <dc:creator />
      <dc:date>2014-03-05T10:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601316#M1109896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes add it under calculated dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you tried the next approach in the expression and you say it gave an error. What error? Did the expression syntax check say 'expression ok'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 10:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601316#M1109896</guid>
      <dc:creator />
      <dc:date>2014-03-05T10:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601317#M1109897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(match("&lt;STRONG&gt;Follow Up Docs&lt;/STRONG&gt;",'Loan','Masterplan')&amp;lt;&amp;gt;0 or match("&lt;STRONG&gt;Returned Docs&lt;/STRONG&gt;",'Loan','MasterPlan')&amp;lt;&amp;gt;0,&lt;STRONG&gt;Application_Id&lt;/STRONG&gt;,null())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;under Add Calculated Dimensions but did not work. Follow Up Docs and Returned Docs are expression labels. In the data they are called NAPS Follow UP documents and NAPS Returned Documents. I tried both but did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the following in expression but says Error in expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(match("Follow Up Docs",'Loan','MasterPlan')&amp;lt;&amp;gt;0 or match("Returned Docs",'Loan','MasterPlan)&amp;lt;&amp;gt;0,sum({&amp;lt;Tray={'NAPS Follow Up Docs'}&amp;gt;}fabs(interval(((Networkdays(Date(pre,'DD/MM/YYYY hh:mm:ss'),Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')) -2)*'$(vWorkDay)') &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(pre))&amp;lt;num('$(vQuitTime)'),if(frac(date(pre))&amp;gt;num('$(vStartTime)'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date(pre,'DD/MM/YYYY hh:mm:ss'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vStartTime)' ,'DD/MM/YYYYhh:mm:ss')),0) &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(CMP_Date))&amp;gt;num('$(vStartTime)'),if(frac(date(CMP_Date))&amp;lt;num('$(vQuitTime)'),(Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)','DD/MM/YYYYhh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),0), 'hh:mm:ss'))*24)/count({&amp;lt;Tray={'NAPS Follow Up Docs'}&amp;gt;}fabs(interval(((Networkdays(Date(pre,'DD/MM/YYYY hh:mm:ss'),Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')) -2)*'$(vWorkDay)') &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(pre))&amp;lt;num('$(vQuitTime)'),if(frac(date(pre))&amp;gt;num('$(vStartTime)'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date(pre,'DD/MM/YYYY hh:mm:ss'),Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)' ,'DD/MM/YYYYhh:mm:ss')-Date#(date(floor(pre),'DD/MM/YYYY') &amp;amp; '$(vStartTime)' ,'DD/MM/YYYYhh:mm:ss')),0) &lt;/P&gt;&lt;P&gt; + &lt;/P&gt;&lt;P&gt; if(frac(date(CMP_Date))&amp;gt;num('$(vStartTime)'),if(frac(date(CMP_Date))&amp;lt;num('$(vQuitTime)'),(Date(CMP_Date,'DD/MM/YYYY hh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vQuitTime)','DD/MM/YYYYhh:mm:ss')-Date#(date(floor(CMP_Date),'DD/MM/YYYY') &amp;amp; '$(vStartTime)','DD/MM/YYYYhh:mm:ss')),0), 'hh:mm:ss'))*24))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 10:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601317#M1109897</guid>
      <dc:creator />
      <dc:date>2014-03-05T10:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601318#M1109898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shoaib,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will it be possible for you to share the application or a sample application with the same scenario to understand the requirement better. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Vino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 06:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601318#M1109898</guid>
      <dc:creator />
      <dc:date>2014-03-06T06:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict Calculation based on Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601319#M1109899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinoth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have solved it. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 09:04:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Restrict-Calculation-based-on-Dimension/m-p/601319#M1109899</guid>
      <dc:creator />
      <dc:date>2014-03-06T09:04:11Z</dc:date>
    </item>
  </channel>
</rss>

