I have a table that contains fields date, amount and Client_ID.
I want to get the count of clients who had an avg R3M greater than same period last year, for every month.
The issue is when I get a calculated field that flags clients with R3M greater than SPLY using an if statement, I am unable to sum the results of that field. I keep getting 1 instead of getting the total count.
My calculations:
R3M: WINDOW_Avg(SUM([Amount]),-2,0)
SPLY: WINDOW_Avg(SUM([Amount]),-14,-12)
comparison: if [R3M] > [R3M - SPLY] then 1 ELSE 0 END
final count (problematic): if [comparison] = 1 then ATTR([Client_ID]) END
Any help is appreciated!
Andalusian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.