# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Creator

## Set analysis for scrollin previuos year and three month

Hello guys,

I need to extract the bought quantity for the last year in the current month and in the further two (now it should be may/jun/jul 2021)

I've set the formula for the previous year, but I need some help with the second condition:

=Num(Aggr(Sum({<AnnoCompetenza={"\$(=Year(Today())-1)"}>} QtaAcquistata), CodArticolo),'#.##0')

Could someone help me, pls?

Thanks.

N.

Labels (1)
• ### Application Development

14 Replies
Creator
Author

Hello Edwin,

now the formula is correct but, as I wrote,  I haven't the date to compare, but only the Month and the Year: is it possible to use them into the formula instead of the data?

Thanks.

N.

Creator
Author

Got it!

=Sum({<AnnoCompetenzaACQ={"\$(=Year(Today())-1)"}, MeseCompetenzaACQ={">=\$(=Num(Month(Today())))<=\$(=Num(Month(Today()))+2)"}>} QtaAcquistataStorica)

Thank you for the support :-).

N.

Master

it appears your month is not a date but a number.  that would have been a great info to have.    i would suggest you use a real date as your solution is not scalable.  if this were a real date you wouldnt need to test for year.

Creator
Author

Yes, Edwin, you're right. I apologize if I wasn't clear enough about the month; however, your solution could be very useful for me when I'll have a date and not a month.

Thank you so much!

N.

Master