Sage Enterprise Intelligence- calculated pivot bugs

Hi all,

On SEI, I am referring this web page https://onlinehelp.sageenterpriseintelligence.com/2023.R12/en/Web-Interface/view-calculated-column.htm?Highlight=pivot to create a calculated pivots. However, it does not work as intended. So, I need to know how the calculated pivot actually works.

Below are my data model parameters for a worksheet.

Compare2ndYear=2024

Compare2ndMonth=10

CompareYear=2023

CompareMonth=12

The formula in calculated pivots and the Expressions is valid.

script for CompareYear column:

script for Compare2ndYear column:

However, these columns are #BI-ERR-UNDEFINED. Check the log files, browser's console, event viewer, no error recorded.

Initially, I want to have a variance column where:

VARIANCE = (@@Compare2ndYear-GPV) - (@@CompareYear-GPV);

However, encountered these errors by only getting the value.

Please advise me how to use Calculated pivots.