Introduction to DAX (Data Analysis Expressions)

Leave a comment

DAX, or Data Analysis Expressions, is a library of functions, formula and query language used in analytics. It is used in:

  • Power BI
  • SSAS Tabular models (SQL Server Analysis Services)
  • Power Pivot in Excel

To write DAX formulas in Power BI, open Power BI Desktop and go to your dataset. In the example below we have Transactions:

Click on the Ellipse next to the dataset and you will see “New measure” and “New column”:

When you make a selection, for example New measure, a formula bar will appear:

You can then rename the measure (the name defaults to Measure) and provide a formula.

A simple example, let’s say we want to know the number of transactions in the dataset. Transactions in this case refers to sales orders. We can give the measure a new name and then start typing in the DAX formula. As we type, we see intellisense helping:

Once complete, DAX will tell us if the formula is correct or not. If incorrect, we can fix it. If not, we can use the measure as a visualization or other.

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *