THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

SQLBI - Marco Russo

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

Ratio Calculation Differences between #MDX and #DAX in #BISM #Tabular

You should have already read that DAX is simpler than MDX. It’s true, and sometime you have to pay a price for simplicity. I am used to say that DAX is somewhere between SQL and MDX. In fact, SQL requires you to put any relationship in the query (using JOIN or subqueries) whereas MDX can only leverage on existing relationships in the underlying data model, without any syntax that allows to create relationships “on the fly” during a query. DAX is in the middle because it can leverage on existing relationships (like MDX) *and* it can also join tables in a query definition (like SQL).

These differences might appear also in unexpected conditions. In the new article Ratio Over Subtotals with Normalized Tables in DAX I show how the calculation of a simple ratio (product vs. model and product vs. category) can be different in DAX according to the underlying data model and the shape of the query used to obtain the result. For example, the fact of showing the category name in the result might affect the way you write the corresponding ratio. After all, this is not so different if you think to a corresponding SQL query, but if you are used to write MDX queries, the effort required in DAX might surprise you.

I would like to your get feedback about these differences between DAX and MDX.

Published Tuesday, December 27, 2011 3:38 PM by Marco Russo (SQLBI)
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(required) 
Submit

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.

This Blog

Syndication

Archives

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement