From the course: Excel Business Intelligence: Power Pivot, DAX and Data Modeling

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

DAX formula syntax and operators

DAX formula syntax and operators

All right. Time to get our hands dirty with some DAX. But before we go crazy and start writing all sorts of functions, I want to start with the syntax. Now, consider a simple DAX formula like this. Here, we've defined either a measure or calculated column called total quantity, which equals the sum of the quantity column within the Transactions table. Let's break this down piece by piece. So it starts with the measure name in gray. And remember, measures will always be surrounded in brackets anytime they're referenced in formulas, so spaces here are okay. After the measure name, you start every DAX formula just like a regular cell formula with an equal sign followed by some sort of a function name. Now, important note, calculated columns don't necessarily need a function, but measures do. So for example, in a calculated column, if you just typed a reference to the quantity column within the Transactions table, it would return the correct value from the quantity column in each row…

Contents