Querying your model with SQL Server Management Studio and DAX
To wrap up the chapter, we are going to create a query in SSMS using DAX. First, DAX is not a query language, so the syntax is not as easy to understand at first for SQL users. The first difference is that you must start every query with EVALUATE
. The EVALUATE
function is used to analyze a table and return the values in the same way as a SELECT
statement does with relational databases. To use EVALUATE
, your outermost function must resolve to a table. Let's work through an example of this process:
- Open SQL Server Management Studio and connect to your tabular model instance. You should see your workspace database there.
- Right-click your workspace database and select New Query followed by DAX.
- Add the
EVAULATE
statement. - In the first query, let's get the
Item
table usingEVALUATE('Item')
. Execute the query to return the contents of theItem
table. You will notice that no measures are...