Pre filter with period over period difference

Hi, I am trying to use prefilter on an MOM difference calculated field. I can save my calculated filed, but when adding it to the chart (table), it is returning an error. can someone please help? periodOverPeriodDifference(percentileDiscOver({attain_running_total},50,[monthstartdate],PRE_FILTER),monthstartdate,MONTH,1)

What’s the error? Do you need to reference the fields in the visual?