Press "Enter" to skip to content

Watch Those DAX Calculations

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.