Set Analysis - Current year and previous financial periods
<p>Trying to get the below code to run correctly, I want to get the <code>sum</code> of the field <code>movement</code> where the field <code>GlYear</code> is the same as what has been selected and the field <code>GlPeriod</code> is less than or equal to the period selected.</p>

<pre><code>sum({$ &lt;GlYear = {"{'1'} =$(=max(GlYear))"}, GlPeriod = {"{'1'} &lt;=$(=max(GlPeriod))"}&gt;}Movement)
</code></pre>

<p>I can't convert the two fields to dates as there are 16 financial periods within a year to be reviewed.</p>