Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
Got it!
=Sum({<AnnoCompetenzaACQ={"$(=Year(Today())-1)"}, MeseCompetenzaACQ={">=$(=Num(Month(Today())))<=$(=Num(Month(Today()))+2)"}>} QtaAcquistataStorica)
Thank you for the support :-).
N.
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.
good you solved your issue.
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.
np glad it somehow helped