Window function has unselected dimension

ERR.DS_API.FORMULA.VALIDATION.WIN_FUNC.BFB_UNSELECTED_DIMENSION

The error occurs when a dimension not involved in the chart building (is not in any of its sections) is specified in the window function formula after BEFORE FILTER BY.
To fix the error, drag the indicated dimension into one of the chart sections or use a different dimension.