Concept Breakdown
This exercise introduces the creation of basic DAX measures. SUM aggregates values from a column. DIVIDE is a robust division function that safely handles potential division by zero. SUMX is an iterator function that evaluates an expression row by row within a specified table and then sums the resulting values. Understanding these functions is fundamental for data aggregation and analysis in Power BI.
What You Will Learn
Understand when to use SUM, DIVIDE, SUMX in a Power BI model.
Practice the concept inside a real PBIX report rather than only reading syntax.
Complete a beginner-level task and verify the result with a hidden answer check.
Practice in Power BI
The starter PBIX link has not been attached yet. The student workflow is ready for the admin to connect the file.
Download and unzip the provided exercise file, then create a new Power BI file.
Load the Excel workbook from the unzipped folder into your Power BI file.
Create a new measure named 'Remain Vote Proportion'.
Define this measure to calculate the total 'Remain' votes divided by the total 'Electorate' from the 'Voting' table. Format this measure as a percentage.
Create a second measure named 'Water under the bridge'.
Define this measure using the `SUMX` function to sum the difference between 'Leave' votes and 'Remain' votes for each row in the 'Voting' table.
Add both measures to a table visual in Power BI to verify their results.
Starter DAX
Remain Vote Proportion = SUM(Voting[Remain]) / SUM(Voting[Electorate])Expected Outcome
A table showing the 'Remain Vote Proportion' by area, formatted as a percentage, and a measure 'Water under the bridge' displaying the total difference between leave and remain votes.