SYPTOM:
On using the OLAP functions like RunningSum in the definition of metric , when executing the report it generates error as shown below:

"Windowed functions and NEXT VALUE FOR functions do not support constants as ORDER BY clause expressions."

Select count (1.0) over (order by 1.0 asc rows unbounded preceding) WJXBFS1 from dbo.VW_VOL_EXCP a118


The SQL is generated because there is no Sort By defined in the RunningCount metric, and by default, it uses the metric expression as Sort By value.
ACTION:
In RunningCount Parameters settings page, choose Sort By tab and use Sort by objects instead, as shown below.

By doing this, the report can be run without error. And the SQL becomes reasonable as below:
Count (1.0) over(order by a118.FCLTY_NBR_TXT asc rows unbounded preceding) WJXBFS1