Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I need to create a formula that should be dynamic on year filter, ignoring other selections.
I tried: sum({1<year=p(year)>} sales) and it works. But there is an issue: if the year is not selected the result is obviously wrong.
What I'd like is: if year is not selected, give me the sales of current year. Otherwise give me the sales of selected year.
I tried with an if: If (IsNull(year), sum({1 <year=p({$(=year(today()))})>} sales), .....etc etc)
But the part in red that replaces year=p(year) doesn't work. Does anyone can help me?
Your expression should be
Sum({1<Year = {"$(=Max(Year))"}>}Sales)
Hi thanks.
I achieved the result through formula: sum({$<year = {$(=year(today()))}>} [quantity activities]) --> this give me the total sales for 2020
using the formula you suggested it gaves me the quantity as if I'd use ALL: Sum({1<Year = {"$(=Max(Year))"}>}Sales) results the same as Sum( all [quantity activities]) --> this give me the total sales for all years in my database.
Anyway your hint has been really helpful. thanks a lot!