Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
---|---|
1000 | 1600 |
1500 | 1400 |
3000 | 3900 |
5000 | 4500 |
Expression Sales column (Oct 2013 - Mar 2014): Expression Sales Previous period (Oct 2012 - Mar 2013):
sum(_sales_amount) ??
Find the solution (see No values in chart at no selection in Listbox)
Can you post a small qlikview document that demonstrates the problem?
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
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.
I will make a demonstration, but I need more time for this.
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
I posted a Excel document. Hope you understand everything!
Sorry, I don't understand your reaction. Will you post an example?
Find the solution (see No values in chart at no selection in Listbox)