

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: DAX
incomplete
2: Logical Functions – IF
incomplete
3: SWITCH Function
incomplete
4: Time Intelligence Functions
incomplete
5: More Time Functions
incomplete
6: Add Columns
incomplete
7: Aggregations
incomplete
8: Aggregations As Measures
incomplete
9: Iterators
incomplete
10: Calculated Columns vs. Measures
incomplete
11: Context in DAX
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
DAX stands for Data Analysis Expressions. It's the language that Power BI uses to perform calculations, build metrics, and create dynamic insights in your reports. While it looks a bit like Excel, DAX is designed specifically for analytical models and large datasets.
DAX allows you to create things like totals, averages, percentages, comparisons, KPIs, and time-based calculations that react instantly to slicers and filters in your report. Any time you see a number in a Power BI visual that updates when you click something, DAX is doing the work behind the scenes.
The formulas we wrote in the last chapter were simple DAX expressions.
There are two main places where you can write DAX in Power BI:
Click to play video
The DAX query view is a more advanced area where you can write DAX queries to inspect data, test expressions, and debug calculations. It's especially helpful when you want to see exactly what a DAX expression is returning without building a full visual.
Query View is the easiest way to "peek behind the curtain" of your model.
You can open it from the left-hand pane:
This query uses the SELECTCOLUMNS function to create a new table with only the columns we specify. It lets us get a quick view into our data – it's a bit like running a one-off SQL SELECT statement.
EVALUATE
SELECTCOLUMNS(
sales,
"sale_price", sales[price],
"customer_id", sales[customer_id]
)
The EVALUATE statement simply tells DAX to run the query and return the results as a table.
Save the project and, from the course directory, submit the CLI tests.