Attached is a new answer. This just requires another calculation to get this to work. In order to get the filter to behave, we essentially just have to do what we did with the window_sum calculations but in a different way.
In this case, I use the lookup function combined with the last function. The lookup function allows us to grab specific values from the table data (the results displayed in the view we get back from the database). Here I use the last() function as the offset so that we put the last value for sum(net sales) into each row in the table. Once this is done with setting the compute using to Pane Down, we can then reapply the filter with a pane down compute using to limit the results.
Hope this helps,
tableau_example_with_max.zip 37.1 KB
Thanks again for your help Dan.