<?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: Brach Level Trading Days in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509328#M190323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this Expression:&lt;/P&gt;&lt;P&gt;Sum(If(BranchStartDate&amp;gt;=vFromDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( [Trading Date]&amp;gt;=BranchStartDate and [Trading Date]&amp;lt;=vToDate,TradingDay),&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( [Trading Date]&amp;gt;=vFromDate and [Trading Date]&amp;lt;=vToDate,TradingDay)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works in your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vidyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jan 2014 16:06:23 GMT</pubDate>
    <dc:creator>vidyut</dc:creator>
    <dc:date>2014-01-14T16:06:23Z</dc:date>
    <item>
      <title>Brach Level Trading Days</title>
      <link>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509325#M190320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts...&lt;/P&gt;&lt;P&gt;Need your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have list of Branches with their Opening/Start Date.&lt;/P&gt;&lt;P&gt;Also, have prepared a table showing Trading Day... i.e. 1 for Full Day, 0.5 for Saturday and 0 for Holiday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created two variables &lt;/P&gt;&lt;P&gt;vFromDate and vToDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Question is :&lt;/P&gt;&lt;P&gt;Need a Final Straight or Pivot Table showing Total Trading Days based on Branch Level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vFromDate &amp;gt; BranchStartDate,&lt;/P&gt;&lt;P&gt;SUM of Trading Day between vFromDate to vToDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;SUM of Trading Day between BranchStartDate to vToDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application enclosed for your reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 15:16:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509325#M190320</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-14T15:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Brach Level Trading Days</title>
      <link>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509326#M190321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar issue at a time.&lt;/P&gt;&lt;P&gt;- You have to generate a StartDate (either branchstartdate or vFrom, whichever is later) in the script.&lt;/P&gt;&lt;P&gt;- In a calendar, you can generate a field that will be 1 for Mo-Fri, 0.5 for Sat, 0 for Sunday&lt;BR /&gt;&amp;nbsp; =&amp;gt; You can use a mapping_table to also get the holidays and assign a 0 value to them like you do for Sundays. (still on scripting level)&lt;/P&gt;&lt;P&gt;- Then you can quite easily sum up the Trading_day values you have between your [generated StartDate] and your vTo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 15:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509326#M190321</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-01-14T15:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Brach Level Trading Days</title>
      <link>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509327#M190322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you know what Trading Days are related to which Branches?&amp;nbsp; Your two tables are not linked in the .qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/51495_pastedImage_0.png" style="width: 620px; height: 375px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 15:57:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509327#M190322</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-01-14T15:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Brach Level Trading Days</title>
      <link>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509328#M190323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this Expression:&lt;/P&gt;&lt;P&gt;Sum(If(BranchStartDate&amp;gt;=vFromDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( [Trading Date]&amp;gt;=BranchStartDate and [Trading Date]&amp;lt;=vToDate,TradingDay),&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( [Trading Date]&amp;gt;=vFromDate and [Trading Date]&amp;lt;=vToDate,TradingDay)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works in your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vidyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 16:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Brach-Level-Trading-Days/m-p/509328#M190323</guid>
      <dc:creator>vidyut</dc:creator>
      <dc:date>2014-01-14T16:06:23Z</dc:date>
    </item>
  </channel>
</rss>

