Qlik Community

New to Qlik Sense

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

Tell us which business and trade publications you read most regularly: RESPOND NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Previous mtd,qtd,wtd,ytd

Can anybody tell me what is the qtd, ytd, mtd, wtd for current and previous for using KPI like previous qtd and current qtd so I didn’t get proper set analysis kindly drop the answers !

1 Reply
Creator III
Creator III


To get the current versus previous "to date" numbers using set analysis, you can use the Qlik created master calendar.

For example:

count({$<[start_date.autoCalendar.InYTD]={1}, [start_date.autoCalendar.YearsAgo]={1}>} ID)

By using the combination of "InYTD" (1 or 0) and "YearsAgo" (0 for current to N number of previous years)  you can control whether you are just counting the current YTD or Previous YTD.

Qlik creates these in the load script under the autoCalendar. There is also MTD, QTD and WTD.

I hope this helps.