SQLBI is a blog dedicated to building Business Intelligence solutions with SQL Server.
You can follow me on Twitter: @marcorus

Query Projection in #DAX

I wrote a short article about query projection in DAX. To make the story short, you should always use SUMMARIZE in order to remove columns from a table in a query. Thus, if you just want three columns from a table, instead of writing this in SQL:

SELECT Col1, Col2, Col3 FROM Table

you should write this in DAX:

EVALUATE SUMMARIZE( Table, Table[Col1], Table[Col2], Table[Col3] )

A longer explanation is available in this article on SQLBI, that also explain how to rename a column, even if there are penalty performances doing that. Feedback are welcome in case you have suggestions!

Comments

Leave a Comment

About Marco Russo (SQLBI)

Marco Russo is a consultant, writer and trainer specialized in Business Intelligence with Microsoft technologies. He runs the SQLBI.COM website, which is dedicated to distribute resources useful for BI developers, like Integration Services components, Analysis Services models, tools, technical information and so on. Marco is certified as MCT, MCDBA, MCSD.NET, MCSA, MCSE+I.