The reason the filter in your example doesn't work is that it is applied at the data source level (in this case, the extract -- but it's true for any source). The table calculation is then applied once the data is returned to Tableau's data engine. At that point, only data for 2012 is available for the table calc.
The good news is that you can achieve the answer you are looking for. If you use a table calc as the filter, then it will be applied after the data returns to the Tableau data engine. Your Window_Sum will be calculated for all the data, but then the table calc filter will be applied afterwards. That will give you the answer you want.
The calculated field to use as a filter looks like this:
LOOKUP(MIN([Order Date]), 0)
I've attached a workbook so you can see it in action.
It's exactly what i needed.
So if i stand correctly, a ''simple calculated field'' will immediately add a a column in the Tableau Data Engine (view data) and the results are available for every row filtered , but a calculation including a Table function (Lookup, Running, Window) will be calculated only on the window, meaning on the row already filtered ... with the exception that if the Table calculation is applied on a filter, then the calculation will be processed before the rows gets filtered and displayed.
That's close. Whenever you apply a dimension, measure, or Row Level calculated field as a filter, then a query is generated to retrieve only the underlying data that meets the query condition.
Table calculations are done after that data returns. So using a Table Calculation as a filter allows all the data to be returned to the Tableau data engine first. Then other table calculations will be processed. Finally, the table calculation filter will be applied.
I apologise that this is an old thread, but in case it is OK to "reopen", I wanted to say thanks for the example as I was having the exact same problem as Michel.
I downloaded your example twbx and it works great, but I found I couldn't implement it in my own file for some reason. Stranger yet, just within your example file, if I remove the "year filter" and then try adding it back in immediately I can't make it work!
When I add it back in, instead of the nice 2009 2010, 2011, 2012 dropdown, I get instead the "relative date range" picker. And no matter what I select in there, the filter pill goes red and has no effect.
I am sure I must be missing a trick as obviously it worked perfectly before I removed and added it back. Was wondering if you had any suggestions as to what that would be? Hopefully that would let me implement the scheme in my workbook.
Thanks a lot,
PS: If it is better for me to open a new question on this one, hopefully a friendly forum admin can tell me - wasn't sure the best approach when it relates to a file already in an answer!