Calculated field creating

Hello,

I am looking to create a calculated field to have an amount in the period of last year compared to today.
Example: it is February 14, 2023, I have the total for this year and I would like to compare this value with the same period last year (between 01-01-22 and 02-14-22).
So, I will find out if I am ahead.

thanks

You can look at these

I have tried but I don’t have the result I was looking for.
Indeed, i am looking for to add a filter of dates and not a period like week, quarter, …

Can you do something like this?

sum(ifelse({DATE}>‘2022’,{numeric_field},0)) - sum(ifelse({DATE}<‘2022’,{numeric_field},0))

You would change the dates with 2022 and the {DATE} field with your date field and numeric field with you field you want calculated.

This would get you the difference.