<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>DAX Time Intelligence for 4-4-5 Calendar, ISO Calendar and other custom ones #dax #powerpivot</title><link>http://sqlblog.com/blogs/marco_russo/archive/2013/02/19/dax-time-intelligence-for-4-4-5-calendar-iso-calendar-and-other-custom-ones-dax-powerpivot.aspx</link><description>DAX offers a set of Time Intelligence functions that simplify writing DAX expressions such as YTD, YOY and other time-related calculations. However, these functions only works when some assumptions are valid: your periods should be “natural” months and</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: DAX Time Intelligence for 4-4-5 Calendar, ISO Calendar and other custom ones #dax #powerpivot</title><link>http://sqlblog.com/blogs/marco_russo/archive/2013/02/19/dax-time-intelligence-for-4-4-5-calendar-iso-calendar-and-other-custom-ones-dax-powerpivot.aspx#47913</link><pubDate>Tue, 26 Feb 2013 07:41:57 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47913</guid><dc:creator>Di</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;Excellent post and it is much better solution, which I used to use DATEADD(dates[date],-91,day) for PQ (fixed 91 days per quarter). However, there is small exception for 4-4-5 calendar. After every 5 or 6 years, there will be a quarter become 5-4-5 and it will cause problem when using your formula.&lt;/p&gt;
&lt;p&gt;Di&lt;/p&gt;
</description></item><item><title>re: DAX Time Intelligence for 4-4-5 Calendar, ISO Calendar and other custom ones #dax #powerpivot</title><link>http://sqlblog.com/blogs/marco_russo/archive/2013/02/19/dax-time-intelligence-for-4-4-5-calendar-iso-calendar-and-other-custom-ones-dax-powerpivot.aspx#47914</link><pubDate>Tue, 26 Feb 2013 07:48:58 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47914</guid><dc:creator>Marco Russo (SQLBI)</dc:creator><description>&lt;p&gt;As you can read in comments of the article, the best way to calculate a &amp;quot;last 13 weeks&amp;quot; calculation is creating a column containing an IncrementalWeekNumber that never resets at the beginning of each year. It's not clear to me what is the issue in quarter that are exceptions - there is an issue in the formula or with a properly configured Calendar table it should work fine with existing formulas?&lt;/p&gt;
</description></item><item><title>re: DAX Time Intelligence for 4-4-5 Calendar, ISO Calendar and other custom ones #dax #powerpivot</title><link>http://sqlblog.com/blogs/marco_russo/archive/2013/02/19/dax-time-intelligence-for-4-4-5-calendar-iso-calendar-and-other-custom-ones-dax-powerpivot.aspx#47929</link><pubDate>Wed, 27 Feb 2013 06:23:06 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47929</guid><dc:creator>Di</dc:creator><description>&lt;p&gt;The exception is due to counting of 364 days/year. So after every 5/6 years, need to add a week to catch up the missed days. For example, we use 26/12/2011 - 02/04/2011 as Q1'11, 03/04/2011 - 02/07/2011 as Q2. I create a column ISO Qtr Day Number (1-98 for Q1, 1-91 for Q2) similar to your sample ISO Year Day Number and create corresponding Iso PQ using&lt;/p&gt;
&lt;p&gt;CONTAINS( VALUES( Dates[ISO Qtr Day Number] ), Dates[ISO Qtr Day Number], Dates[ISO Qtr Day Number] ). &lt;/p&gt;
&lt;p&gt;It will not count the 92-98 days in Q1 because current context in Q2 only has Qtr day number 1-91.&lt;/p&gt;
</description></item><item><title>re: DAX Time Intelligence for 4-4-5 Calendar, ISO Calendar and other custom ones #dax #powerpivot</title><link>http://sqlblog.com/blogs/marco_russo/archive/2013/02/19/dax-time-intelligence-for-4-4-5-calendar-iso-calendar-and-other-custom-ones-dax-powerpivot.aspx#47930</link><pubDate>Wed, 27 Feb 2013 06:38:26 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47930</guid><dc:creator>Marco Russo (SQLBI)</dc:creator><description>&lt;p&gt;Yes, that's correct - however, it's good to know it only affects the way you create the Dates table and doesn't affect the DAX formula used to perform the comparison. The article was intended to show how to approach the problem, it's not a complete pattern for every type of calendar. I hope to be able to find the time to write a more complete example in the future, the problem is that there are many differences for different needs that makes it hard to write a single template that's good for everyone.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description></item><item><title>re: DAX Time Intelligence for 4-4-5 Calendar, ISO Calendar and other custom ones #dax #powerpivot</title><link>http://sqlblog.com/blogs/marco_russo/archive/2013/02/19/dax-time-intelligence-for-4-4-5-calendar-iso-calendar-and-other-custom-ones-dax-powerpivot.aspx#47970</link><pubDate>Fri, 01 Mar 2013 06:29:36 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47970</guid><dc:creator>Di</dc:creator><description>&lt;p&gt;Agree, the most important is the concept you shared and it is very useful. &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</description></item></channel></rss>