<?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: Calculate percentage based on the # of Tuesday's in a month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142427#M635110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like discussed here for the weekday count?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/215896"&gt;¿How to count Saturdays in date range?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Tuesday count would look like&lt;/P&gt;&lt;P&gt;=Div(WEEKDAY(Monthstart(today())-&lt;STRONG&gt;2&lt;/STRONG&gt;)+1-Monthstart(today())+Today(),7)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2016 14:04:45 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-13T14:04:45Z</dc:date>
    <item>
      <title>Calculate percentage based on the # of Tuesday's in a month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142426#M635109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following expression which gives me a sum for food cost. I then take this sum and divide by net sales to get a Food Cost %.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accounting wants to see this percentage averaged by the number of Tuesdays in the month to date. So for instance, the number of Tuesday for May to Date is 2, next week it will be 3 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how best to tackle this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression is Food Cost $/Net Sales (this expression is just the food cost)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=1)&amp;lt;=$(=Max(Day(Today()-2)))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KEY_FormID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'DRSbwyPOS'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KEY_Report&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={128}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KEY_Store&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={210, 325}&amp;gt;}Amount),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Else&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({$&amp;lt;KEY_FormID={'DRSbwyPOS'}, KEY_Report={128}, KEY_Store-={210, 325}&amp;gt;}Amount)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 14:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142426#M635109</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2016-05-13T14:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage based on the # of Tuesday's in a month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142427#M635110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like discussed here for the weekday count?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/215896"&gt;¿How to count Saturdays in date range?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Tuesday count would look like&lt;/P&gt;&lt;P&gt;=Div(WEEKDAY(Monthstart(today())-&lt;STRONG&gt;2&lt;/STRONG&gt;)+1-Monthstart(today())+Today(),7)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 14:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142427#M635110</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-13T14:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage based on the # of Tuesday's in a month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142428#M635111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for your quick response&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 14:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-percentage-based-on-the-of-Tuesday-s-in-a-month/m-p/1142428#M635111</guid>
      <dc:creator>jenmclean</dc:creator>
      <dc:date>2016-05-13T14:22:09Z</dc:date>
    </item>
  </channel>
</rss>

