The evaluation of an entire table (as shown in the previous recipe, Retrieving data from a single table) excludes the wider concept of projection, because the example returns all the columns from a single table. More often than not, we wish to return only a subset of columns (or perhaps even derived columns) from one or more tables. Unlike SQL, which allows projection in its syntax, DAX has no succinct projection equivalent.
Consider the following SQL statement, which selects
Select table_a.column_a, table_b.column_b From …
Using DAX, we cannot specify a projection in the same manner (as follows):
If we wish to mimic this activity using DAX, we must define the table as part of the
evaluate statement. This recipe examines how to do that.