How to Use Power BI DAX: A Beginner Tutorial

1.6M views
•
May 17, 2021
by
Kevin Stratvert
YouTube video player
How to Use Power BI DAX: A Beginner Tutorial

TL;DR

DAX is a formula language used in Power BI to create measures that summarize data across related tables. Start by loading data from Excel, establish relationships, then write a measure such as total units sold using the sum function on the orders table, aided by IntelliSense and a graphical workflow.

Transcript

Hi everyone, Kevin here. Today, I want to  show you how you can use DAX in Power BI. So, what is DAX and what does it even stand for?  Well, it stands for Data Analysis Expressions. It's basically a formula language with functions.  If you've ever used Microsoft Excel before and you've written formulas and functions, it's very  similar to that. If ... Read More

Key Insights

  • DAX is a formula language for Power BI that resembles Excel formulas.
  • Three Excel sheets are loaded and imported into Power BI to form the data model.
  • Relationships are established between tables, with Orders as the main table.
  • Cookie Types and Customers act as look-up tables to support Orders.
  • A measure is a calculated value that runs across the data model.
  • The SUM function can sum an entire column in a specified table field.
  • IntelliSense helps choose the correct function and parameters.
  • Visuals like matrices can display the new measure alongside related fields.

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How do you start using DAX in Power BI for a new project

To start using DAX in Power BI, load your data into a data model from sources such as Excel, then verify and define relationships between the tables. Look up related fields to ensure one to many relationships are correct, and identify look-up tables that provide supporting information to the main orders table. This setup is crucial before creating any measures.

Q: What is a measure in Power BI and why is it important

A measure is a calculation that runs across the data model rather than in a single row. It enables aggregations like sums or averages to be computed in context with the data being analyzed. Creating measures allows you to summarize large datasets efficiently and use the results in visuals, making reporting more flexible and dynamic.

Q: How would you create your first measure in Power BI

To create your first measure, right click the orders table and choose add new measure. Enter a descriptive name, then use a DAX function such as SUM to define the calculation. Select the appropriate table (orders) and field (units sold) as the parameter, then commit the measure so it appears in the Fields pane and can be used in visuals.

Q: What is IntelliSense and how does it help when writing DAX

IntelliSense is a feature that shows a list of possible functions when you type a function name, along with a short description of what each function does. This helps you quickly find the correct function and confirm its purpose, making it easier to assemble accurate DAX expressions and reduce errors during measure creation.

Q: What is the difference between a table and a look-up table in Power BI

A main table, like Orders, contains the core transactional data you analyze. Look-up tables, such as Cookie Types and Customers, provide supporting information and are related to the main table to enrich analysis. These relationships enable accurate filtering and context when calculating measures across tables.

Q: How do you relate tables in Power BI and why is it important

Relating tables creates a data model that combines information from multiple sources. Establishing correct relationships ensures that calculations, filters, and visuals reflect accurate context. For example, linking Orders to Customers by customer ID and linking Orders to Cookie Types by product enables aggregated insights across the dataset.

Q: What is the role of the data model view in this workflow

The data model view lets you see the three imported tables and their relationships. It highlights how Orders connects to Customers via customer ID and how a relationship to Cookie Types can be established by mapping product to cookie type. This view is essential for validating the schema before creating measures.

Q: What should you visualize after creating a measure like total units sold

After creating a measure such as total units sold, you can bring it into a visualization like a matrix or table. You can also combine it with fields like customer name to show per-customer totals. This demonstrates how the measure aggregates data across the established relationships and data model.

Summary & Key Takeaways

  • This section explains loading data from three Excel sheets into Power BI, including how to choose the correct sheets and load them into the model. It emphasizes verifying relationships between tables and designating look-up tables to support the main orders table. The goal is to prepare a data model ready for DAX measures.

  • Next, it covers what a measure is and how to create one step by step, including naming, using the sum function, selecting the correct table and field, and committing the measure so it appears in the Fields pane for visualization.

  • Finally, it touches on visualizing the measure in a matrix, exploring fields like customer name, and recognizing the practical effect of the measure on reporting and analysis.


Read in Other Languages (beta)

Share This Summary 📚

Explore More Summaries from Kevin Stratvert 📚