Window function has no aggregated expressions among its arguments

ERR.DS_API.FORMULA.VALIDATION.WIN_FUNC.NO_AGG

Be sure to use an aggregated expression as an argument of your window function (window functions must accept measures as arguments).