Forum Discussion

fretief's avatar
fretief
New Member
4 years ago
Solved

Using a temporary table variable to simplify CALCULATE

My data model consists of the following two tables (stripped of columns not relevant to this post): Dates: [Date], [End of Week]   WorkOrders: [Compliance Date], [Finish Date], [Order Type]   The ...
  • johnt75's avatar
    johnt75
    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.