Forum Discussion
Using a temporary table variable to simplify CALCULATE
- 4 years ago
You can use REMOVEFILTERS to remove the context filters from a table or column(s) from a table, so REMOVEFILTERS('Date'[End of week]) might work in both cases.
One thing to bear in mind though, particularly with date tables, is that other helper columns from that table can also be added to the filter, usually sort order columns. You can check which columns are being used by using Performance Analyzer to grab the DAX code generated for the visual and check it in DAX Studio. Make sure that you either include all of them in the REMOVEFILTERS or just use the entire Date table in there.
You could replace the ALL(WorkOrders) with ALLEXCEPT(WorkOrders, WorkOrders[Order Type])
As for whether 1 is preferable to the other, you would need to run server timings and query plan against both to make sure, but I would doubt that there is a significant performance difference between the 2.