Regarding Time Intelligence prerequisites Melissa made such great explanation in serial of posts + provide code.
Maybe you can start from:
and follow the links.
Good luck.