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.