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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

i need previous 3 months data..(set analysis)

Hi community,

I have a problem that is, when ever i select Year and Month then i need previous 3 months data.

Example:

year     :2012

Month     : Sep

  Now i need sum of previous 3 months :    Aug+July+Jun .

Thanks ,

satti

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

sum({<DateFieldName = {">=$(=MonthStart(Max(DateFieldName), -3))<=$(=MonthEnd(Max(DateFieldName), -1))"},Year=,Month=, Quarter=>}Sales)

Hope this helps you.

Regards,

Jagan.

View solution in original post

5 Replies
sushil353
Master II
Master II

Hi,

Please find the attached app.

Hope that helps you.

Sushil

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Use the expression like shown below.

     sum({<Date = {">=$(=Addmonths(makedate(max(Year),Max(Month)),-3))"},Year=,Month=>}Sales)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik Solanki,

I have used sushil kumar's attached Application to check our Expression. but i did not get expected result.

Could you plz check expression with attached Application.

Thanks and Regards,

      Satti

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

sum({<DateFieldName = {">=$(=MonthStart(Max(DateFieldName), -3))<=$(=MonthEnd(Max(DateFieldName), -1))"},Year=,Month=, Quarter=>}Sales)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

thanks Jagan

   It's working  .