Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Dynamic MTD Calculation

Hi ,

I trying to calculate dynamic MTD  in stright table , I used below set anlysis to claculate this,

num(sum({$<Year = {$(=max(Year))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))>$(=max({<Year={$(=max(Year))}>} Month)-1)"}>} [In profit center local currency_KSL]), '$#,##0;($#,##0)')


but this give out "0" if there are no values for the perticular document perticular for that month, I want only to on current month documetnt to be considered.Can any one help me on this ?


1 Reply
Valued Contributor II

Dynamic MTD Calculation


please try this Expression .I thing Useful for U.

num(sum({$<Year = {$(=max(Year))}, Month = {"<=$(=month(max(Date)))>$(=addmonths(month(max(Date)),-1))"}>} [In profit center local currency_KSL]), '$#,##0;($#,##0)')

Regards ,