<?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. :Daily Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256311#M1205254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see any error.&lt;/P&gt;&lt;P&gt;Could you send an exemple of your application to illustrate this. You can reduce your datas and scramble them in document properties / scrambling if you want.&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 May 2010 19:30:29 GMT</pubDate>
    <dc:creator>martin59</dc:creator>
    <dc:date>2010-05-06T19:30:29Z</dc:date>
    <item>
      <title>Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256310#M1205252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does something look wrong with this formula?&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TotNumber={'60','61','62'},SalesDate={'05/05/2010'}&amp;gt;}if(isnull(EndDate),Amount))&lt;/P&gt;&lt;P&gt;This formula works, but I also want to select by date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TotNumber={'60','61','62'}&amp;gt;}if(isnull(EndDate),Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;My main goal is to develop a report that shows Daily Sales in columns so I can see the previous 7 days worth of sales.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 17:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256310#M1205252</guid>
      <dc:creator />
      <dc:date>2010-05-06T17:11:22Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256311#M1205254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see any error.&lt;/P&gt;&lt;P&gt;Could you send an exemple of your application to illustrate this. You can reduce your datas and scramble them in document properties / scrambling if you want.&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 19:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256311#M1205254</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2010-05-06T19:30:29Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256312#M1205256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case it matters, QlikView is sensitive to the date format used in set analysis. So the '05/05/2010' will match a SalesDate in 05/05/2010 format, but not 05/05/10 format, for instance. Also, I recommend len(EndDate)&amp;lt;1 instead of isnull(EndDate) due to some implementation differences with, I believe, the 64-bit version. But no, I'm not actually seeing an error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 21:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256312#M1205256</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-06T21:24:31Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256313#M1205258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0in 0in 0pt;"&gt;5/5/2010 12:00:00AM&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;this is the actual format that is pulled in another application, I tried to type this exactly and it still doesn't work. Is it possible to set the format of the Date in the set analysis formula?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 22:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256313#M1205258</guid>
      <dc:creator />
      <dc:date>2010-05-06T22:53:45Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256314#M1205260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can set the format of the date in the set analysis expression. For instance, I think this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;TotNumber={'60','61','62'},SalesDate={'$(=date(date#(20100505,'YYYYMMDD'),'D/M/YYYY hh:mm:ss TT'))'}&amp;gt;}if(isnull(EndDate),Amount))&lt;/P&gt;&lt;P&gt;BUT that isn't what I'd do. Instead, I'd convert your date to your desired format as your read it into QlikView from your data source. Something like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(date#(SourceSalesDate,'D/M/YYYY hh:mm:ss TT'),'DD/MM/YYYY') as SalesDate&lt;/P&gt;&lt;P&gt;Since SalesDate will then be in the desired format, I believe your original expression would then work as is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 23:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256314#M1205260</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-06T23:11:48Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256315#M1205261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Ok, I got the formula to work as follows.&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;sum&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to see the last 7 days worth of sales though I have to have 7 expressions with different dates in each expression. It works, but I have to change the date every day in each expression I would like to try to get it to calculated autimatically.&lt;/P&gt;&lt;P&gt;I've tried substituting the following in for the date SalesDate={'Today()-1'} and SalesDate={'Max(SalesDate)'}. but the formulas don't work then.&lt;/P&gt;({&amp;lt;&lt;B&gt;TotNumber&lt;/B&gt;={'60','61','62'},&lt;B&gt;SalesDate&lt;/B&gt;={'5/2/2010 12:00:00 AM'}&amp;gt;} &lt;B&gt;Amount&lt;/B&gt;) &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 16:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256315#M1205261</guid>
      <dc:creator />
      <dc:date>2010-05-07T16:16:14Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256316#M1205262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Ok, I got the formula to work as follows.&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P&gt;&lt;B&gt;sum({&amp;lt;&lt;/B&gt;&lt;B&gt;TotNumber&lt;/B&gt;={'60','61','62'},&lt;B&gt;SalesDate&lt;/B&gt;={'5/2/2010 12:00:00 AM'}&amp;gt;} &lt;B&gt;Amount&lt;/B&gt;)&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to see the last 7 days worth of sales though I have to have 7 expressions with different dates in each expression. It works, but I have to change the date every day in each expression I would like to try to get it to calculated autimatically.&lt;/P&gt;&lt;P&gt;I've tried substituting the following in for the date SalesDate={'Today()-1'} and SalesDate={'Max(SalesDate)'}. but the formulas don't work then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 16:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256316#M1205262</guid>
      <dc:creator />
      <dc:date>2010-05-07T16:17:45Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256317#M1205263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you place your code or formulas between the words code and /code both enclosed in square brackets [ ] you get the nice gray box with fixed font and scroll bar ...&lt;/P&gt;&lt;P&gt;You have to inclose your date value in a $ expansion expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sum({&amp;lt;TotNumber={'60'},SalesDate={'$(=Max(SalesDate))'}&amp;gt;} Amount)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You should also make sure you use the same date format throughout your app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 16:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256317#M1205263</guid>
      <dc:creator />
      <dc:date>2010-05-07T16:33:05Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256318#M1205264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that formula works as I want it to. Now I want to create another column with the daily sales for the day before the date calculated previously. I tried adding -1 after $(=Max(SalesDate)) but it doesn't work. What's the trick?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 19:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256318#M1205264</guid>
      <dc:creator />
      <dc:date>2010-05-10T19:56:41Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256319#M1205265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this would be the right syntax, but have not tested.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;TotNumber={'60'},SalesDate={'$(=date(max(SalesDate)-1))'}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 20:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256319#M1205265</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-10T20:18:25Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256320#M1205266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That didn't work either. I created another column in the application with the expression =Max(SalesDate)-1 and it returns the value I'm looking for, but once I include it in the expression to sum the sales for that day it doesn't work!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 20:35:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256320#M1205266</guid>
      <dc:creator />
      <dc:date>2010-05-10T20:35:34Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256321#M1205267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may have to manually specify a date format:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;TotNumber={'60'},SalesDate={'$(=date(max(SalesDate)-1,&lt;STRONG&gt;'your format here'&lt;/STRONG&gt;))'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;You may have to list any date-like fields that are connected to your SalesDate, telling the system to ignore them like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;TotNumber={'60'},SalesDate={'$(=date(max(SalesDate)-1))'}&lt;STRONG&gt;,SalesWeek=,SalesMonth=,SalesYear=&lt;/STRONG&gt;&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;It's hard to debug without knowing anything else about your data model or script, but perhaps one or the other or both of those will be required in your case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 20:40:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256321#M1205267</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-10T20:40:56Z</dc:date>
    </item>
    <item>
      <title>Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256322#M1205268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Radam, in our sales world we are using this to retrive last 7 days...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-sum({&amp;lt;Year=,Date={"&amp;gt;=$(=date((vToday -1)-7,'MM/DD/YY'))"} &amp;gt; } [Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You than can throw in date as a column and it will show you sales by said date&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 20:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256322#M1205268</guid>
      <dc:creator>james</dc:creator>
      <dc:date>2010-05-10T20:55:12Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256323#M1205269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What info can I tell you to help troubleshoot? I'm selecting data from 2 tables both tables have other date fields, does that mean I need to tell the system to ignore them?&lt;/P&gt;&lt;P&gt;Also, If I need to manually specify a date format would it be the same format that is set at the beginning of the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 21:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256323#M1205269</guid>
      <dc:creator />
      <dc:date>2010-05-10T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re. :Daily Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256324#M1205270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;radam wrote: I'm selecting data from 2 tables both tables have other date fields, does that mean I need to tell the system to ignore them?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I can only tell you how to think the problem though, not what the answer is.&lt;/P&gt;&lt;P&gt;Let's say you have three fields - Date, Week and Month. The user selects the month of August 2010, and the week of July 26, 2010 through August 1, 2010. Max(Date) is now August 1, 2010. Max(Date)-1 is July 31, 2010. But that date is disallowed by the Month selection. It therefore isn't good enough to simply override the Date selection. You must ALSO tell it to ignore the Month selection. For similar reasons for different Week and Month selections, you must tell it to ignore the Week.&lt;/P&gt;&lt;P&gt;That doesn't mean you have to ignore every possible date field in your entire data set. For instance, you might have an OrderMonth and a ShipmentMonth. If you're trying to report a selected ShipmentDate along with the previous ShipmentDate, you'll need to tell QlikView to ignore the ShipmentMonth, but you probably do NOT want to tell it to ignore the OrderMonth. Or you might. It all depends on what data YOU want to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;radam wrote:Also, If I need to manually specify a date format would it be the same format that is set at the beginning of the script?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It would be the date format used by your field, from wherever that field's date format is specified. That can be done at the beginning of the script. It can be done when loading that specific field. It can be done in the document properties.&lt;/P&gt;&lt;P&gt;But if you want to add Date={...} to a set, the specified date inside of the brackets must match the format of the Date field, wherever that was specified. If the Date field is in 'MMM DD, YYYY', then that's exactly what the expression in the brackets has to return. If that's the format specified at the beginning of your script, a mere date(...) should work. If not, date(...,'MMM DD, YYYY') would work.&lt;/P&gt;&lt;P&gt;If you're still having trouble, I suggest making a simple application with some simple data loaded by inline loads that demonstrates the problem you're having.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 23:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Sales/m-p/256324#M1205270</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-10T23:11:47Z</dc:date>
    </item>
  </channel>
</rss>

