<?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: current day vs previous day in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424816#M158247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Date={'$(=date(max(Date)-1))'}&amp;gt;} BuyPriceRealized)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Date={'$(=date(enddate-1))'}&amp;gt;} BuyPriceRealized)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose if your end date will never change, you could hardcode it, but assuming you keep loading in new data over time, you'd want to handle it with an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I realize we're trying to solve a "problem" that isn't really a problem and that you didn't even ask about.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2012 17:17:52 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2012-10-17T17:17:52Z</dc:date>
    <item>
      <title>current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424809#M158240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im having some trouble by getting my previous day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im using this formular &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Current day is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;CD&amp;gt;} BuyPriceRealized) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//CD is equal to &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;inday(TempDate, $(vToday), 0) * -1 AS CD,&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; from my mastercalendar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This one returns the current day i have selected (I dont wont to show today, cause i dont have data atm) so i want to hardcorded previous day, and im trying to do it by this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={"2012"}, Month={"sep"}, Day{"24"}&amp;gt;} BuyPriceRealized) //I does not show anything, but if i remove day i get the sum from 2012 and sep.. So it seems to be my Day there is a problem with, but i cant figure out what...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 16:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424809#M158240</guid>
      <dc:creator />
      <dc:date>2012-10-17T16:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424810#M158241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you cut and pasted the expression and it isn't a typo in the post, you missed the equals sign after Day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also recommend using single quotes for literals.&amp;nbsp; Double quotes specify a search expression.&amp;nbsp; Now, searching for "2012" will just return '2012', so it's the equivalent of '2012', but I believe it's an extra (albeit trivial) step for QlikView to go through.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 16:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424810#M158241</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-17T16:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424811#M158242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha, Jesus christ - I should go home!!!! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; It was the equal sign - How dumb can i be &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; Sorry about that.....I really couldnt understand that i was working cause it seemed kinda right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 16:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424811#M158242</guid>
      <dc:creator />
      <dc:date>2012-10-17T16:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424812#M158243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st of all i see you have not equated Day={24}...try like this if it helps&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={2012}, Month={"sep"}, Day&lt;STRONG&gt;=&lt;/STRONG&gt;{24}&amp;gt;} BuyPriceRealized)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another solution for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={'=$(=today()-1)'}&amp;gt;} BuyPriceRealized)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Date field is from the master calendar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:05:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424812#M158243</guid>
      <dc:creator />
      <dc:date>2012-10-17T17:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424813#M158244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with hsharmas's alternative solution, assuming you have a master calendar and it has a date in it.&amp;nbsp; And you should have a master calendar, and it should have a date in it.&amp;nbsp; That's going to be much easier than calculating the right year, month and day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:09:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424813#M158244</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-17T17:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424814#M158245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ive solved it - it was because of the = sign.. And the other thing does not work, cause it takes from our real life date (so it would be the 16 it would take)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424814#M158245</guid>
      <dc:creator />
      <dc:date>2012-10-17T17:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424815#M158246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a mastercalendar with all my dates - But my enddate (where theres data till) is the 24th of september. And if i use today i will get the system date (17th of october) - Therefore i need to hardcode it - &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424815#M158246</guid>
      <dc:creator />
      <dc:date>2012-10-17T17:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424816#M158247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Date={'$(=date(max(Date)-1))'}&amp;gt;} BuyPriceRealized)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Date={'$(=date(enddate-1))'}&amp;gt;} BuyPriceRealized)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose if your end date will never change, you could hardcode it, but assuming you keep loading in new data over time, you'd want to handle it with an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I realize we're trying to solve a "problem" that isn't really a problem and that you didn't even ask about.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424816#M158247</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-17T17:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424817#M158248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I absolutely agree with you - It should not be hardcoded at all - but in this case it will never change, and data will never ever come in again, so its easier to hardcode it. But i totally agree with you it should be hardcoded so it whould automatically change every day (It is an KPI) so if it was not a POC it whould be prefered alot &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;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;sum({$&amp;lt;Date={'=$(=today()-1)'}&amp;gt;} BuyPriceRealized)&lt;/SPAN&gt; &amp;lt;-- this code only returns my current selected day, why i dont know, cause it should be able to take the day before even though i have selected 24th of september??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424817#M158248</guid>
      <dc:creator />
      <dc:date>2012-10-17T17:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424818#M158249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't actually understand why it would return your selected date.&amp;nbsp; I wouldn't expect it to work exactly as is, though, even if the general idea is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You'll probably need to wrap the today()-1 in a date() function, or it will forget it's a date and just return a number.&amp;nbsp; Since set analysis does a text comparison rather than a date comparison, this formatting problem would keep it from having a match.&lt;/LI&gt;&lt;LI&gt;You don't have any data for October 16, 2012, right?&lt;/LI&gt;&lt;LI&gt;Your calendar provides other fields for specifying a date without actually selecting a Date.&amp;nbsp; When you do the Date=, you're only overriding the date selection.&amp;nbsp; To really make it work, you would need to also tell QlikView to ignore the selections in other fields in the calendar.&amp;nbsp; This would normally be done as a hardcoded list of fields:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Date={'$(=date(today()-1))'},Year=,Quarter=,Month=,Week=,Day=&amp;gt;} BuyPriceRealized)﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;But it CAN be done without the list of fields by telling QlikView to ignore every field in the calendar except for the Date.&amp;nbsp; The syntax is nearly impossible for a person to parse, though, so I'd have to look it up or reinvent it, and chances are you don't want it anyway.&amp;nbsp; Just letting you know it's possible if your calendar has 20 different fields on it, and you're adding new ones all the time, and don't want to have to maintain your expressions.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424818#M158249</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-17T17:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424819#M158250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, doesnt work, and no i dont have data from yesterday, only untill the 24th of september &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;But hardcoded is fine! But it is really strange - but okay, i have only worked with qlikview for 2 weeks, so maybe its just me!! &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;But im gettin there! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 17:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424819#M158250</guid>
      <dc:creator />
      <dc:date>2012-10-17T17:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: current day vs previous day</title>
      <link>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424820#M158251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please solve this query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading active_link" href="https://community.qlik.com/thread/64255" title="http://community.qlik.com/thread/64255"&gt;http://community.qlik.com/thread/64255&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;hsharmas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 11:37:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/current-day-vs-previous-day/m-p/424820#M158251</guid>
      <dc:creator />
      <dc:date>2012-10-19T11:37:41Z</dc:date>
    </item>
  </channel>
</rss>

