Announcements
cancel
Showing results for
Did you mean:
Creator II

## Last year quarter

Hello guys,

I need to calculate the selling summarize of the relative quarter of the last year; for example in September 2022 I had to consider Sep-Oct-Nov 2021, in October 2022 Oct-Nov-Dec 2021

To do this calculation I use this formula:

Sum({<AnnoCompetenzaVEN={"\$(=Year(Today())-1)"}, MeseCompetenzaVEN={">=\$(=Num(Month(Today())))<=\$(=Num(Month(Today()))+2)"}>} QtaVendutaStorica)

My problem is that in November 2022 I should consider Nov-Dec 2021-Jan 2022, in December 2022 Dec 2021-Jan-Feb 2022

Could anyone help me with this set analysis formula, please?

Thanks.

N.

Labels (1)
• ### Application Development

1 Solution

Accepted Solutions
MVP

What you're describing isn't a quarter per se, near as I can tell, it's a running-three-months calculation. Perhaps try using Date = {">=\$(=AddYears(MonthStart(Today()),-1)<=\$(=AddYears(MonthEnd(AddMonths(Today(),2),-1)))"}>} or something similar (I hope I got the syntax spot on, since I can't test it and there's a lot of parenthesis in there).

2 Replies
MVP

What you're describing isn't a quarter per se, near as I can tell, it's a running-three-months calculation. Perhaps try using Date = {">=\$(=AddYears(MonthStart(Today()),-1)<=\$(=AddYears(MonthEnd(AddMonths(Today(),2),-1)))"}>} or something similar (I hope I got the syntax spot on, since I can't test it and there's a lot of parenthesis in there).

Creator II
Author

Hi,

Your suggestion is a good solution; I wasn't able to solve with the elegant set_analysis

but I made it with a rough formula:

Are you able to teach me what is wrong in the first formula, pls?

Thank you.

N.

Community Browser