Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

last 12 months

Hai   Friends,

Please see The Attach File

Please Select Year and month Then Ii will show only one month



but i want if i select 2010 and month feb then chart will show last 12 months along with feb month

it means jan-2009 to feb 2010

so please Give Me Better Solution

6 Replies
SunilChauhan
Champion
Champion

see the attached file

hope this helps you

Sunil Chauhan
Not applicable
Author

i did same as you sent

but they are asking like

if manuvally select year and month then chart will show last 12 month

any idea

Not applicable
Author

Try this expression

sum({1<FinalDate={">=$([12 rolling])<=$(MonthEnd)"}>} AmountTotal)

Not applicable
Author

hai Thanks,

but we have 8.2 set analysis not working pls send me solution with if analysis

Not applicable
Author

This would give the expression:

SUM( ALL IF( FinalDate >= [12 rolling] AND FinalDate <= MonthEnd, AmountTotal, 0 ) )

OR

SUM( TOTAL IF( FinalDate >= [12 rolling] AND FinalDate <= MonthEnd, AmountTotal, 0 ) )

Not applicable
Author

Hi Ram,

try using the way luminary gave you.

Build a field:

Date(Date(Date#(MONTH&'-'&YEAR,'MMM-YY'),'DD-MM-YYYY'),'MMM-YY') as MonthYear

Then

use this expression:

Sum( if( MonthYear >= Date(addmonths(Max(MonthYear), -12), 'MMM-YY') and MonthYear<= Date(addmonths(Max(MonthYear), -1),  'MMM-YY')

     ,

         AmountTotal

     )

)

translated from luminary expr with set analysis.

And put as dimension of your chart MonthYear.

It should work ... I hope

Regards

Giampiero