Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous MonthYear presentation

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

Filter MonthYear
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
   sum({<Year=,Month=,Week=>}_Sales_amount))            (Oct 2012-March 2013):?                                  


In script:

(MonthName(TempDate),Year(TempDate) & right(0 & num(Month(TempDate)),2)) as MonthYear,

(TempDate)*100 + month(TempDate) as MonthYear_Period,

(MonthYear_Period,'MonthYear_Period_ID') as MonthYear_Period_ID

1 Reply
Not applicable
Author

Additional information: I have made the variable 'Previous MonthYear': MonthYear_Period_ID -12.

The expression of Sales Previous period will be:  sum({<$(Previous MonthYear)>} $(vSales))

Now this expression is only working for one selection in filter MonthYear.

I want to see the selection from Oct 2012 - Mar 2013 when using filter MonthYear for the previous period of Oct 2013-Mar 2014.

Who knows the solution for my issue?