Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Time stamp Drill down for last year, month, week

Hi Experts,

How do i created drill down of  year, month, week, days for below timestamp column. 


Labels (3)
2 Replies
Partner - Master III
Partner - Master III

You need to make a Master calendar table which based on your timestamp/date field . This will have the year month etc.
Then create a drill down group Year--> Month-->Week

You can get the theory from youtube video
use the script in the link below (at the very end)

 On another note unless you need the time portion of your data (especially if data size is high) would recommend removing the timestamp using floor function


In your transaction table where you have the timestamp create a new field called %date like the script below.

date(SubField(Timestamp, ' ',1)) as %date 
FROM YourSource;

Then, after you created this field, run the code seen below to create an master calendar.

for each _date in FieldValueList ('%date')
LOAD '$(_date)' as %date, year('$(_date)') as Year, month('$(_date)') as Month, Week('$(_date)') as Week, Weekday('$(_date)') as Weekday AutoGenerate 1; next

You can expand the fields in this calendar according to your own need ant taste. (Google search for  master calendar Qlik to find other more detailed master calendars.

Take a look at my earlier comment on how to create drill down dimensions. Be aware when using week in drill down from month, a week can belong to two months.