DAX Variables

Chris Webb shows how to define variables in DAX:

Variables are the best thing to happen to DAX since, well forever – they are so cool I’m almost ready to like DAX as much as I like MDX. There are already several good articles and blog posts out there describing how to use them (see here and here), but I was looking at a Profiler trace the other day and saw something I hadn’t yet realised about them: you can declare and use variables in the DEFINE clause of a DAX query. Since my series of posts on DAX queriesstill gets a fair amount of traffic, I thought it would be worth writing a brief post showing how this works.

There are some limitations, but Chris shows a way of getting around one of them.

Related Posts

Error Running Analysis Services Processing Task

Angela Henry ran into a problem with the SSIS Analysis Services processing task: In both of these scenarios you will not be able to save the package.  So what the heck are you supposed to do?!  Here’s where my tunnel vision (and panic) sets in.  How was I supposed to get my SSAS objects processed? […]

Read More

SSAS Query Analyzer

Chris Webb reviews Analysis Services Query Analyzer: Last week a new, free tool for analysing the performance of MDX queries on SSAS Multidimensional was released: Analysis Services Query Analyzer. You can get all the details and download it here: https://ssasqueryanalyzer.github.io/ …and here’s a post on LinkedIn by one of the authors, Francesco De Chirico, explaining […]

Read More


October 2016
« Sep Nov »