Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Previous one Month data

Dear Experts

i am trying to implement the Previous one month and Rolling 3 Months data to display on textbox

i have tried but its giving some error please help me to get the Previous n Months data selection

for reference i have attached the sample application

Best Regards,

Niranjan

1 Solution

Accepted Solutions
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

try these..

PrevMonth:

=Sum({<Period1={$(=num(addmonths(Max(Period1),-1)))}>}Market_Volume_Sales)

Rolling3:

=Sum({<Period1={'>=$(=num(addmonths(Max(Period1),-2)))<=$(=Max(Period1))'}>}Market_Volume_Sales)

View solution in original post

5 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

NavinReddy
Creator II
Creator II
Author

Hi Bacius,

Thanks for your reply

i have tried with MTD expression i got the full year of data

Regards

Niranjan

Kushal_Chawda

if you have Date field then Try below

Previos 1 month

=sum({<Date = {">=$(=monthstart(addmonths(max(Date),-1)))<=$(=monthend(addmonths(max(Date),-1)))"}>}Value)

Rolling 3 months

=sum({<Date = {">=$(=addmonths(max(Date),-3))<=$(=max(Date))"}>}Value)

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

try these..

PrevMonth:

=Sum({<Period1={$(=num(addmonths(Max(Period1),-1)))}>}Market_Volume_Sales)

Rolling3:

=Sum({<Period1={'>=$(=num(addmonths(Max(Period1),-2)))<=$(=Max(Period1))'}>}Market_Volume_Sales)

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Here is your Rolling 12.

Rolling12:

=Sum({<Period1={'>=$(=num(addmonths(Max(Period1),-11)))<=$(=Max(Period1))'}>}Market_Volume_Sales)