Watch Those DAX Calculations

Kevin Feasel

2015-12-18

DAX

Chris Webb shows us a case in which Power BI Desktop’s DAX calculation might not be what you expect:

The difference here is that the Month Number and Month Name fields are both present – they have to be since the query has to sort by Month Number. In MDX the order of members on a hierarchy can be set inside the model; in a DAX query you can only sort using an ORDER BY clause and for that to work, the field you’re ordering by must be present in the query.

This kind of feels like an edge case, but if you run into it, it’s good to know that it’s not a bug.

Related Posts

Variables In DAX

Matt Allington shows us how to use variables in DAX: Variables in DAX is a relatively new feature and is available in Power BI Desktop Excel 2016 SSAS Tabular 2016 Variables are not available in Excel 2013 or Excel 2010. Click through to see how to assign and use variables.  It’s interesting to see how […]

Read More

DAX Is Still Important

Reid Havens explains why he teaches DAX in his Power BI courses: The Check Formula button is an easily overlooked feature. However, before I hit ok and save my DAX Measure I ALWAYS press this button first! But what exactly does this button do? Well it’s checking your DAX syntax and making sure everything is written correctly. Now […]

Read More

Categories

December 2015
MTWTFSS
« Nov Jan »
 123456
78910111213
14151617181920
21222324252627
28293031