Qlik Community

Community Corner

Discussion board for questions about the Qlik Community, its features, sharing information, general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
Showing results for 
Search instead for 
Did you mean: 

Standard expression for last twelve months

I have a scenario , need to prepare a standard expression for 


2. YTD

3.Last twelve months

sum({<$(vCYPeriod),Scenario={'CPL_ACT'}>}Value) [STANDARD FORMULA]


vPeriodTypeCYMTH=[Fiscal year]={'$(=$(vCurrYear))'},[Posting period]={'$(=$(vCurrMonth))'}

vPeriodTypeCYYTD=[Fiscal year]={'$(=$(vCurrYear))'},[Posting period]={"<=$(=$(vCurrMonth))"}

vCYPeriod changes as per I select the variable as Monthly,YTD and Last twelve months. For Last twelve months the formula  is

<[Fiscal year]={'$(=$(vLast12MonthsStartYear))'},[Posting period]={">=$(=$(vLast12MonthsStartMonth))"}> + <[Fiscal year]={'$(=$(vCurrYear))'},[Posting period]={"<=$(=$(vCurrMonth))"}>

vLast12MonthsStartMonth if($(vCurrMonth)=12,1,$(vCurrMonth)+1)
vLast12MonthsStartYear if($(vCurrMonth)=12,$(vCurrYear), $(vPrevYear))

Can someone help me to modify the expression in such a way, so that it can be used in the standard format , i.e mentioned above.

Labels (1)
1 Reply
Community Manager
Community Manager

@Pallabi77 Are you using QlikView or Sense?  I would like to move it into the correct product forum. 

Sue Macaluso