Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Month Year previous selection

How do I realize the calculation in my straight table chart expression of column Sales (Previous period) based on filter 'Month Year'?

Filter Month Year
Jul 2013   Aug 2013   Sep 2013   Okt 2013   Nov 2013   Dec 2013   Jan 2014   Feb 2014   Mar 2014   Apr 2014   May 2014

Sales

October 2013 - March 2014

Sales (Previous period)

October 2012 - March 2013

10001600
15001400
30003900
50004500

Expression Sales column (Oct 2013 - Mar 2014):               Expression Sales Previous period (Oct 2012 - Mar 2013):              

sum(_sales_amount)                                                           ??

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

8 Replies
Gysbert_Wassenaar

Can you post a small qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Enza,

It seams you are trying to get the same period of the previous year. If so, you can do it by doing like this:

??:

sum({$<PerdiodID=, Year= {$(= max(Year-1))} >} _sales_amount)

Maybe this helps you

Regards,

MB

Anonymous
Not applicable
Author

Thanks for your fast reply.

We are using the 'Month Year' filter for seasons selections: October 2013 - March 2014 or

November 2013 - December 2013 AND February 2014 -March 2014

I think your code will not work because of the code 'max(Year-1)' in it.

It only will selects the periods 2014 - 1.

Please correct me if I'm wrong.

Anonymous
Not applicable
Author

I will make a demonstration, but I need more time for this.

miguelbraga
Partner - Specialist III
Partner - Specialist III

You need to get a field with the year, and then make your selection as equal as your Filter Month Year. The Year field must be correlated with the Month Year field

Anonymous
Not applicable
Author

I posted a Excel document. Hope you understand everything!

Anonymous
Not applicable
Author

Sorry, I don't understand your reaction. Will you post an example?

Anonymous
Not applicable
Author