Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone. I created this variable:
last_year = year(today())-1
In the following script, I need to do a count reffered to two years ago:
count({1<[Years]={"($(last_year) - 1)"},[Team]=P([Team])>}distinct [Player])
There is a syntax mistake when calculating last year - 1. How can I fix it?
There is a typo. Change it to:
count({1<[Years]={"$(=$(last_year) - 1)"},[Team]=P([Team])>}distinct [Player])
- Marcus
You could try:
let last_year = year(today())-1;
count({1<[Years]={"$=($(last_year) - 1)"},[Team]=P([Team])>}distinct [Player])
- Marcus
Hi Marcus,
neither with {"$=($(last_year) - 1)"}, a result is given back. It's very strange, because putting a value to years value, there is a result. There is something wrong with "$" character.
There is a typo. Change it to:
count({1<[Years]={"$(=$(last_year) - 1)"},[Team]=P([Team])>}distinct [Player])
- Marcus