Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

abhaysingh
Contributor III

MTD and PMTD in Qliksense

HI all,

I am trying to do MTD and PMTD but MTD is working an dPMTD is not working.

MTD:

NUm(Count({<"Calendar Month Num"={'$(vMaxMonth)'}, "Calendar Year"= {'$(vMaxYear)'}, TaskStatusNum= {'1'}>}SurveyTaskId),'#,##0')

variable :  vMaxMonth = max("Calendar Month Num")

vMaxYear = max"Calendar Year")



PMTD:

NUm(Count({<"Calendar Month Num"={'$(vPreviousMonth)'}, "Calendar Year"= {'$(vMaxYear)'}, TaskStatusNum= {'1'}>}SurveyTaskId),'#,##0')

variable :  vPreviousMonth= max("Calendar Month Num")-1

vMaxYear = max"Calendar Year")


Pls correct if m wrong

3 Replies
Employee
Employee

Re: MTD and PMTD in Qliksense

take a look at stevedark‌  variables. need logic to cover prior periods that straddle multiple years, also need to cancel all other date selections in the set modifiers when manipulating through set analysis.

QlikView App: Set Analysis - Prior Period Comparison

MVP
MVP

Re: MTD and PMTD in Qliksense

balrajahlawat
Esteemed Contributor

Re: MTD and PMTD in Qliksense

Strange. Syntax looks okay..