Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there a way to calculate PY values when a value is selected in year filter?
Let's assume we have the following values:
Year, Sales
2019, 50
2018, 40
2017, 20
If I select 2019 in the year filter, sum ({<Year={"$(=max(Year))"}>} sales) returns current year (2019) values, but calculation for PY sum ({<Year={"$(=max(Year))-1"}>} sales) returns zero.
thats odd.
i checked below in my local app and it works.
sum ({<Year={"$(=max(Year)-1)"}>} LineSalesAmount)
which version of sense are you on. newer versions give an output preview of the dollar sign expansion. see below. check that
your -1 is not inside the dollar sign expansion
sum ({<Year={"$(=max(Year))-1"}>} sales)
change to below
sum ({<Year={"$(=max(Year)-1)"}>} sales)
Thanks for your quick reply but it still returns zero..
thats odd.
i checked below in my local app and it works.
sum ({<Year={"$(=max(Year)-1)"}>} LineSalesAmount)
which version of sense are you on. newer versions give an output preview of the dollar sign expansion. see below. check that
Checked again and it worked, thanks very much for your help 🙂
Great. Mark as answered to close the thread