Skip to main content
Meet our latest featured member Bruno! Drop a like and comment. READ ON
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare a period of months against last year??

Hello everybody!

I'm a new user from Qlikview and I'm stucked with a couple of expressions.

I'm trying to compare same two periods of months; the first is from current year and the second is the previous year.

My first expression is this one:

Sum ( { $ < EstatusCredito = { 'Activo' , 'Cerrada' } , FC_Year = { $(=Max(FC_Year)) } > } Capital )

This actually works properly.

The second one is this one:

Sum ( { $ < EstatusCredito = { 'Activo' , 'Cerrada' } , FC_Year = { $(=Max(FC_Year)-1) } , FC_Month = { $(=Month(Max(FC_MonthYear))) } >  } Capital )

Second one is my headache! Because it always returns only the current month, from last year. What I want is a sum from January (previous year) to the curent month (previous year)

Could anyone help, please?


Nathan T.

4 Replies

may be for previous year (all months from jan to max month)

=sum({$<EstatusCredito = { 'Activo' , 'Cerrada' }, FC_Year ={$(=max(FC_Year )-1)},FC_Month ={"<=$(=(max(FC_Month )))"}>} Capital )

I don't understand why you use two different fields for month, FC_Month and  FC_MonthYear

Not applicable

Hey Nathan,

Maybe this might help you

QlikView App: Set Analysis - Prior Period Comparison

Its highly informative.

Not applicable


It didn't work 'cause it returns a sum of the whole year. 2013 in this case.

Maybe I didn't explain myself very good. In this case I'm comparing Jan-Apr 2014 vs Jan-Apr 2013; it's because my Max Date is Today()-2. So, that's why I'm comparing same periods, different year.

That's with no filters. But if I select Year 2013, it must compare Jan-Dec 2013 vs Jan-Dec 2012. Same with 2012, it'd be Jan-Dec 2012 vs Jan-Dec 2011.

FC_MonthYear was created in my calendar from this: MonthName(Tempdate) as FC_MonthYear.

Not applicable

Thanks, Ajay!

It's great for day-to-day comparison. But actually I need a full period comparison.