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

hello ,

I managed to set up the set analysis expression  that generates the sum of the rolling 12-month from MAX  the month loaded data.

But the problem is that by selecting one/many month (MMMYYYY) of the selection list, it takes maximum months slected as the reference !!

Set analysis expression is :

=sum({<[MARQUE]={'BMW'},YYYY= ,MMM= ,MMMYYYY=,[MMMYYYY]={'>=$(=AddMonths(max([MMMYYYY]),-11))'}>

+<[PW]={'286'},YYYY= ,MMM= ,MMMYYYY= ,[MMMYYYY]={'>=$(=AddMonths(max([MMMYYYY]),-11))'}> Sales)

thanks .

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Sum({<[MARQUE]={'BMW'},YYYY= ,MMM= ,MMMYYYY=,[MMMYYYY]={'>=$(=AddMonths(Max({1}[MMMYYYY]),-11))'}>

+<[PW]={'286'},YYYY= ,MMM= ,MMMYYYY= ,[MMMYYYY]={'>=$(=AddMonths(Max({1}[MMMYYYY]),-11))'}>Sales)


View solution in original post

2 Replies
sunny_talwar

Try this:

=Sum({<[MARQUE]={'BMW'},YYYY= ,MMM= ,MMMYYYY=,[MMMYYYY]={'>=$(=AddMonths(Max({1}[MMMYYYY]),-11))'}>

+<[PW]={'286'},YYYY= ,MMM= ,MMMYYYY= ,[MMMYYYY]={'>=$(=AddMonths(Max({1}[MMMYYYY]),-11))'}>Sales)


Not applicable
Author

Thanks Sunny . It works