So far the queries that we have created in DAX have focused on the entire result set (with the exception of the start at clause in evaluate). Naturally, we would want to restrict the rowset in some way and this is the focus of this post – how to filter rowset tables in DAX queries. There are two ways to do this, firstly, we can use the CACULCUATETABLE syntax and secondly we can use a FILTER that covers the evaluate syntax.
BOL defines the function of CALCULATETABLE as “Evaluates a table expression in a context modified by the given filters” taking the form;
CALCULATETABLE(<expression>,<filter1>,<filter2>,…) 
There are many applications of how we can use this, however, let’s look at the first of reducing the rows returned, say for the first six months of 2000. We can evaluate this query like this.
evaluate 
One of the restrictions of using CALCULATETABLE to restrict rows is that the filter cannot be applied to calculated measures. So if we extended the filter arguments to include a condition on ‘sales_amount’, we would get an error.
evaluate 
A function ‘CALCULATE’ has been used in a True/False expression that is used as a table filter expression. This is not allowed. 
Note that the filter arguments in calculate table are applied to the underlying table regardless of the fields returned (projected or selected). So, if we wanted to sum for the first 6 months sales for the year 2000, we could simply remove the ‘dates'[month] field from the summarize and the calculation is applied only for Jan to Jun.
evaluate 
We could also include this restriction in the definition of the calculation and achieve the same results (see sum_amount2 below).
evaluate ) 
From the rowset point of view, we are still faced with the problem of how to restrict rows based on a calculated value. In order to do this, we can apply the FILTER function against the table. Filter returns a subset of the table and takes the form;

Consider yearly sales for the first six months of the year as below;
evaluate 
A filter can be applied to this rowset so that only sales over 50,000 are returned. Note that it is wrapped around the CALCUALTETABLE.
evaluate filter ) 
In these situations, it may be best to define the measure explicitly;
define measure ‘dates'[sum_amount] = calculate(sum(‘Sales'[amount])) evaluate filter ) 