Phil Price Posted April 22, 2020 Share Posted April 22, 2020 I am working through the Micahel Phillips book and I have run into a problem. In chapter 6 there is an exercise to use drop down lists and document properties to control the Y axis on a scatter chart. The example requires the below two expression to be used in a Document Property. I have ensured I have typed everything as per the book but I cannot get the chart to work. I suspect it might be something to do with the [Axis.X] as this is in red. When I use the sameexpressions directly as custom expressions in the Y Axis then they work fine but when the expressions are used in a document property and then have the Y Axis linked to the document property they do not work. I know I am missing something I just dont know what. Avg([One-Month Rate]) OVER (LastPeriods(${AggregationPeriod}, [Axis.X])) as [${AggregationPeriod}-Month Cumulative Average] Sum([One-Month Rate]) OVER (LastPeriods(${AggregationPeriod}, [Axis.X])) as [${AggregationPeriod}-Month Cumulative Sum] Link to comment Share on other sites More sharing options...
Shashank Gurnalkar Posted April 22, 2020 Share Posted April 22, 2020 Your Y-axis custom expression is $esc(${AverageCumulative})The ESC function is enclosing the document property value into square brackets [], which is making Spotfire to find that particular column that does not exist.Since the document property value is a custom expression and not the column name, you can directly use the belowin the Y-axis: ${AverageCumulative} Link to comment Share on other sites More sharing options...
Phil Price Posted April 22, 2020 Author Share Posted April 22, 2020 Thank you. I knew it was something simple. I will research the ESC function. I did not know this about ESC. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now