Ok.. Now you know how to get current year in model .
In your first projection node, you can calculate two columns with "Component" function.
Add another projection and filter on DIFF. You only need data where DIFF is 0 , 1, and 2.
You can later use this DIFF field for "restricted column".
Overall model would be like this.. Apply filter at projection 2.
Projection 1 ------> Projection 2 ------->Aggregation ----->Semantics
However, this would bring all the data to Projection 1 and then filter at Projection 2. You can do filter at projection 1 itself, using Input Parameter which dynamically gets the data.
Note: you can cast DIFF field as NVARCHAR( attribute), so that you can use it in Restriction .
FISCYEAR(A) | CURRENT_YEAR(B) | DIFF(B-A) |
2016 | 2016 | 0 |
2015 | 2016 | 1 |
2014 | 2016 | 2 |
2013 | 2016 | 3 |
2014 | 2016 | 2 |
2015 | 2016 | 1 |
2013 | 2016 | 3 |
2016 | 2016 | 0 |
2011 | 2016 | 5 |
2009 | 2016 | 7 |