Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Rolling 12 months

Hello Everyone,

I am using below variables and expressions to get rolling 12 months data.

variables:

vMaxYearMonth=max({<Flag={'XXX'}>} Date( Date# ( Month&'-'&Year_No,'MMM-YYYY'),'MMM-YYYY'))

(vMaxMonthYear_PY12)==date(AddMonths(vMaxYearMonth,-11),'MMM-YYYY')

Expression:

=(sum({$<Year_No={$(vCY)},DATE=,WeekStart=,Month=,Year_No=,Month_Year={'>=$(vMaxMonthYear_PY12) <=$(vMaxYearMonth)'}>}aggr(sum({$<Year_No={$(vCY)},DATE=,WeekStart=,Month=,Year_No=,Month_Year={'>=$(vMaxMonthYear_PY12) <=$(vMaxYearMonth)'}>}D360.Revenue_Prop),CODE,Month_Year)))

but i am not getting any value. my data at date level,

Can any body tell me where i am doing mistake

Thanks

2 Replies
PrashantSangle

Hi,

It is really long expression, Very difficult to find error.

But still you can try like below

1: Write your variable Name in text Object.

Did you get any value for it

vMaxYearMonth=max({<Flag={'XXX'}>} Date( Date# ( Month&'-'&Year_No,'MMM-YYYY'),'MMM-YYYY'))

(vMaxMonthYear_PY12)==date(AddMonths(vMaxYearMonth,-11),'MMM-YYYY')

I am not getting why there is == in your variable

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
HirisH_V7
Master
Master

hi,

You can use like this at calendar  At back end

    If(Date>= AddMonths(Today(), -12), 1)as Last12MonthFlag

At front end

Last12MonthFlag={1}


Hope this Helps


Regards,

hirish

HirisH
“Aspire to Inspire before we Expire!”