I am new to SAS and am struggling with calculated item creation.
I have a 3 fields, Name, Value and Date.
Value - Date
1 - 01/01/2021
2 - 01/01/2021
3 - 01/01/2021
4 - 01/02/2021
5 - 01/02/2021
6 - 01/02/2021
7 - 01/03/2021
8 - 01/03/2021
9 - 01/03/2021
I want to create a measure where I can see the sum of the value, for the most recent date, so 7+8+9 = 24 in this instance as the max date is 01/03/2021.
I want this date to be the max date, rather than a specific date I set in the measure, because the data will update over time.
I am using SAS Viya, so I am not looking for a programming solution, unless that is my only option.
I have tried using an IF statement but get the errors below.
I also tried to use "Suppress" to but have not been successful.
Can anyone help?