Juan, You need to add a calendar table to your table structure. It will link to your time-date field in your fact table and will have various date dimensional fields you would need like week, month-year, month, year, etc. You can find great examples of this code many places on this forum. Try here: http://community.qlik.com/docs/DOC-1310