I try to create Pivot BAQ to summarize the amount by month. when I test the BAQ, the result comes up and is correct. but can not save this BAQ, because EPICOR pops up a warning.
Sometimes naming the calculated field with a name that is also a SQL keyword can cause issues. Try renaming the calculated field with something like xMonth instead of Month to see if that helps
I think the problem is that the key field Mth for the PIVOT clause can’t be filtered by any subquery before PIVOT.
I created the field Mth in Subquery1 and referenced to Subquery2, and the Subquery2 is filtered by some criteria, then referenced to the subquery of PIVOT. that caused the problem.
I deleted SubQuery2 and referenced Subquery1 to the subquery of PIVOT directly. the problem is solved.