I have had a lot of question about time intelligent functions lately. Most folks ask me whether they really need to follow all the PowerPivot Time Intelligent Golden rules and what happens when they don’t.
In this blog I will show you what happens when you do not use all the rules, these are the rules you should take to hart:
- Never use the datetime column from the fact table in time functions.
- Always create a separate Time table.
- Make sure your datetime table has a continues date range
- Create relationships between fact tables and the Time table.
- Make sure that relationships are based on a datetime column (and NOT based on another artificial key column).
- The datetime column in the Time table should be at day granularity (without fractions of a day).
So here is what happens when you:
- Do not use a separate time table, this will give you unexpected behavior and results of time intel functions.
- Make sure that relationships are based on a datetime column
When you don’t use a relationship based on a datetime column you need to work around it using the All function
and this will happen:
read more: http://www.powerpivotblog.nl/powerpivot-time-intelligent-functions-revisited-why-use-all-and-how-to-work-around-it
- You want to use a date column that is based on the day granularity or relationships won’t be recognized (date with hours won’t relate to a date with no hours)
- Do not use a continues date range or PowerPivot functions will behave not as expected.
As you can see making sure all Time Intel. golden rules are met is a very good idea, otherwise you will get surprising results or DAX functions that will return no values.