<?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: Date Calculation Question in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829762#M11391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome.&amp;nbsp; I had not heard of "master calendar".&amp;nbsp; I guess I need to learn more about that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2015 17:39:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-21T17:39:49Z</dc:date>
    <item>
      <title>Date Calculation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829760#M11389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hello Community Members!&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;This is my first week working with Qlik Sense Desktop and as thrilled as I am, I get stuck occasionally.&amp;nbsp; This community helped me extremely well last time and I'm hoping someone can help me with this one as well.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I have one table that uses the date field like this:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="86836" alt="Date - Transactions.JPG" class="jive-image image-1" src="/legacyfs/online/87211_Date - Transactions.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks to the community, I now have that interpreted by using this formula:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(DATE#(left("date/time",len("date/time")-4),'MMM DD, YYYY hh:mm:ss tt')) as Date,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;But now I also have another table that makes the date like this:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="86837" alt="Date - Ads.JPG" class="jive-image image-2" src="/legacyfs/online/87215_Date - Ads.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I'd like to think I was smart enough to figure this one out, so I used this formula:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(DATE#("Start Date",'MM/DD/YYYY hh:mm')) as AdDate,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;It seemed to work.&amp;nbsp; I have both tables loaded and they are connected with the key field "sku".&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;See below:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="86838" alt="Data Model.JPG" class="jive-image image-3" src="/legacyfs/online/87216_Data Model.JPG" style="height: 493px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;NOTE:&amp;nbsp; I made the two date fields as different fields (Date for one and AdDate for the other).&amp;nbsp; That seemed to be the right thing to do.&amp;nbsp; But I'm not sure.&amp;nbsp; I'll get back to that in a minute.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;At any rate, you can see that I have a list of total transactions and transactions from Paid Ads only.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The image below shows how I can see both the total transactions and the transactions from Paid Ads.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG __jive_id="86839" alt="Sales vs Paid.JPG" class="image-4 jive-image" src="/legacyfs/online/87217_Sales vs Paid.JPG" style="height: 344px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Looking at the bar graphs above..&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The top one uses the dimension =Day(Date)&lt;/LI&gt;&lt;LI&gt;The bottom one uses the dimension =Day(AdDate)&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I would now like to create a third bar graph right below this that shows the difference between the two.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;HERE'S MY QUESTION(S):&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Should I have handled the importing of the dates differently?&amp;nbsp; If so, how?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Is there a way to do the math to get the table I want above if the dates are two different fields?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I really appreciate the help and apologize if it is so newbie I should know better.&amp;nbsp; (It seems as if dates are the hard part for me.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 16:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829760#M11389</guid>
      <dc:creator />
      <dc:date>2015-05-21T16:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829761#M11390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cory - you need a master calendar that introduces a new date field that links to both types of your dates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a good link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3585"&gt;Canonical Date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would have to be a central table that joins to both tables that have dates.&amp;nbsp; You may need to setup a central link table that has all the common dimnesions (sku, date ) or it may make sense to just merge the two tables by SKU first. There are a few options on the modelling but it depends what you are trying to do .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either way take a look at the blog and see if that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 17:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829761#M11390</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2015-05-21T17:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829762#M11391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome.&amp;nbsp; I had not heard of "master calendar".&amp;nbsp; I guess I need to learn more about that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 17:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829762#M11391</guid>
      <dc:creator />
      <dc:date>2015-05-21T17:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation Question</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829763#M11392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, it looks like the "cannonical calendar" is what I really need to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 17:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Calculation-Question/m-p/829763#M11392</guid>
      <dc:creator />
      <dc:date>2015-05-21T17:42:03Z</dc:date>
    </item>
  </channel>
</rss>

