Project Botticelli

Status message

See the new version of this article on Tecflix.com! Why? Read our announcement.

Querying with DAX Purchase this course

25 November 2017 · 2 comments · 456 views

Mastering DAX Workshop

You can use DAX to create calculated columns and measures, but you can also use DAX as a query language with the help of specific tools such as DAX Studio. The query syntax is based on the EVALUATE statement, which materializes to the client the result of a table expression. For this reason, after learning how to write DAX queries using EVALUATE in DAX Studio, you will learn a number of table functions useful in both queries and other DAX expressions.

You will see functions to filter rows, such as FILTER, CALCULATETABLE, and TOPN; functions to group rows and project columns, such as SUMMARIZE, SUMMARIZECOLUMNS, GROUPBY, and SELECTCOLUMNS; functions to manipulate tables, such as CROSSJOIN, GENERATE, and conditions might affect the data lineage in different ways.

You will also see other utility functions, such as ROW, LOOKUPVALUE, and CONTAINS, TOPN, UNION, INTERSECT, and EXCEPT, SUMMARIZECOLUMN and GROUPBY.

Finally, you will learn how to create measures local to a query, how to inject parameters in a query, and how to use DAX measures in MDX queries. These techniques are very useful to improve productivity when you are developing and testing new measures.

After a quick recap, you can start Lab 6.

Log in or purchase access below to the premium version of this content.

Purchase A Full Access Subscription

Subscription Best Value

$480/year

Access all content for 1 year.
  Purchase on Tecflix

  • Payment is instant and you will receive a tax invoice straight away.
  • Your satisfaction is paramount: we offer a no-quibble refund guarantee.

Comments

hxy0135 · 17 February 2018

Hi Dear Instructor,
In MDX, we can use Generate() to create a NamedSet to be used as rows in a report. What is the use for the result returned by Generate() in DAX since Tabular does not support NamedSet?

thank You!

Marco Russo · 18 February 2018

It is used to generate tables within a complex DAX Expression.
There are many possible use cases, you can find a few of them here: https://www.sqlbi.com/articles/using-generate-and-row-instead-of-addcolumns-in-dax/