Bird
Raised Fist0
Power BIbi_tool~5 mins

Why DAX powers calculations in Power BI - Why Use It

Choose your learning style10 modes available
Introduction
Power BI uses DAX to do calculations because it helps create fast and flexible formulas. This lets you analyze data easily and get answers quickly without changing the original data.
When you want to add new numbers like totals or averages to your report
When you need to filter data dynamically based on user selections
When you want to create calculated columns or measures that update automatically
When you want to compare data across different time periods like months or years
When you want to build interactive dashboards that respond to clicks and filters
Steps
Step 1: Open your Power BI Desktop file
- Power BI Desktop main window
Your data model and report pages appear on screen
Step 2: Click on the Modeling tab
- Ribbon at the top
Modeling options including New Measure and New Column become visible
Step 3: Click New Measure
- Modeling tab
A formula bar appears where you can type a DAX formula
Step 4: Type a simple DAX formula like Total Sales = SUM(Sales[Amount])
- Formula bar
A new measure named Total Sales is created and ready to use in visuals
Step 5: Add a visual like a card or table to your report
- Report canvas
The visual shows the result of your DAX calculation, such as the total sales number
Before vs After
Before
Report shows raw sales data without any totals or calculated insights
After
Report displays total sales as a single number calculated by DAX, updating automatically with filters
Settings Reference
Data Type
📍 Modeling tab > Properties pane
Defines the type of data your DAX calculation returns
Default: Decimal Number
Format
📍 Modeling tab > Properties pane
Controls how the result of your DAX formula is displayed in visuals
Default: General
Common Mistakes
Typing DAX formulas with Excel functions like SUMIF
DAX uses its own functions and syntax different from Excel
Use DAX functions like CALCULATE and FILTER for conditional calculations
Creating calculated columns when a measure would be better
Calculated columns increase data size and do not respond to filters dynamically
Use measures for calculations that should change with report filters
Summary
DAX is the language Power BI uses to create fast, flexible calculations.
It helps add new insights without changing original data.
Use measures for dynamic calculations that respond to filters.

Practice

(1/5)
1. What is the main purpose of DAX in Power BI?
easy
A. To perform calculations and create measures
B. To design the layout of reports
C. To import data from external sources
D. To create visual themes and colors

Solution

  1. Step 1: Understand DAX role in Power BI

    DAX is a formula language used to create calculations like sums and averages.
  2. Step 2: Differentiate from other tasks

    Designing layouts, importing data, and theming are done by other Power BI features, not DAX.
  3. Final Answer:

    To perform calculations and create measures -> Option A
  4. Quick Check:

    DAX = calculations [OK]
Hint: DAX = calculations, not design or import [OK]
Common Mistakes:
  • Confusing DAX with report design tools
  • Thinking DAX imports data
  • Assuming DAX controls colors or themes
2. Which of the following is the correct syntax to create a simple sum measure in DAX?
easy
A. Total Sales = SUM(Sales[Amount])
B. Total Sales := SUM(Sales[Amount])
C. Total Sales = SUMM(Sales[Amount])
D. Total Sales = SUM[Sales.Amount]

Solution

  1. Step 1: Review correct DAX sum syntax

    The SUM function uses parentheses and column reference with table[column] format.
  2. Step 2: Identify syntax errors in other options

    Total Sales := SUM(Sales[Amount]) uses := which is incorrect in Power BI measures; Total Sales = SUMM(Sales[Amount]) misspells SUM; Total Sales = SUM[Sales.Amount] uses wrong column reference syntax.
  3. Final Answer:

    Total Sales = SUM(Sales[Amount]) -> Option A
  4. Quick Check:

    SUM function syntax = Total Sales = SUM(Sales[Amount]) [OK]
Hint: SUM uses parentheses and table[column] format [OK]
Common Mistakes:
  • Using := instead of = for measures
  • Misspelling function names like SUMM
  • Incorrect column reference syntax
3. Given the DAX measure:
Average Sales = AVERAGE(Sales[Amount])
What will this measure return when used in a report?
medium
A. The total sum of all sales amounts
B. The average value of the sales amounts
C. The count of sales transactions
D. The maximum sales amount

Solution

  1. Step 1: Understand the AVERAGE function

    AVERAGE calculates the mean value of the specified column's numbers.
  2. Step 2: Compare with other options

    SUM gives total, COUNT counts rows, MAX finds highest value, so they don't match the measure.
  3. Final Answer:

    The average value of the sales amounts -> Option B
  4. Quick Check:

    AVERAGE function returns mean = The average value of the sales amounts [OK]
Hint: AVERAGE means mean value, not sum or count [OK]
Common Mistakes:
  • Confusing AVERAGE with SUM or COUNT
  • Assuming it returns max value
  • Ignoring function purpose
4. Identify the error in this DAX measure:
Profit = SUM(Sales[Amount]) - SUM(Costs[Cost)
medium
A. Minus sign (-) is not allowed in DAX
B. SUM function cannot be used with Costs table
C. Measure name cannot be 'Profit'
D. Missing closing bracket in Costs column reference

Solution

  1. Step 1: Check syntax of column references

    The Costs column reference is missing a closing bracket ")" after Costs[Cost].
  2. Step 2: Validate other parts

    SUM can be used on any numeric column; measure names can be any valid identifier; minus sign is valid for subtraction.
  3. Final Answer:

    Missing closing bracket in Costs column reference -> Option D
  4. Quick Check:

    Bracket mismatch causes syntax error = Missing closing bracket in Costs column reference [OK]
Hint: Check all brackets carefully in column references [OK]
Common Mistakes:
  • Ignoring missing or extra brackets
  • Thinking function usage is wrong
  • Assuming measure names are restricted
  • Misunderstanding operators allowed
5. You want to create a measure that calculates the total sales only for the current year dynamically. Which DAX expression correctly achieves this?
hard
A. Total Sales CY = SUM(Sales[Amount]) WHERE YEAR(Sales[Date]) = YEAR(TODAY())
B. Total Sales CY = CALCULATE(SUM(Sales[Amount]), YEAR(Sales[Date]) = YEAR(TODAY()))
C. Total Sales CY = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, YEAR(Sales[Date]) = YEAR(TODAY())))
D. Total Sales CY = SUMX(FILTER(Sales, Sales[Date] = TODAY()), Sales[Amount])

Solution

  1. Step 1: Understand CALCULATE with FILTER usage

    CALCULATE modifies filter context; FILTER creates a table filtered by year matching current year.
  2. Step 2: Analyze each option's correctness

    Total Sales CY = CALCULATE(SUM(Sales[Amount]), YEAR(Sales[Date]) = YEAR(TODAY())) uses a boolean expression directly inside CALCULATE which is invalid; Total Sales CY = SUM(Sales[Amount]) WHERE YEAR(Sales[Date]) = YEAR(TODAY()) uses SQL-like WHERE which is not DAX syntax; Total Sales CY = SUMX(FILTER(Sales, Sales[Date] = TODAY()), Sales[Amount]) filters only today's date, not the whole year.
  3. Final Answer:

    Total Sales CY = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, YEAR(Sales[Date]) = YEAR(TODAY()))) -> Option C
  4. Quick Check:

    Use CALCULATE with FILTER for dynamic year filter [OK]
Hint: Use CALCULATE with FILTER for dynamic date filters [OK]
Common Mistakes:
  • Using boolean conditions directly in CALCULATE
  • Applying SQL syntax like WHERE in DAX
  • Filtering only one day instead of full year
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard