0
0
Power BIbi_tool~15 mins

SUMX and iterators in Power BI - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants to understand the total revenue generated by each product category, considering the quantity sold and unit price for each product.
📊 Data: You have a sales table with columns: ProductCategory, ProductName, QuantitySold, and UnitPrice.
🎯 Deliverable: Create a report that shows total revenue by product category using a calculated measure with SUMX.
Progress0 / 3 steps
Sample Data
ProductCategoryProductNameQuantitySoldUnitPrice
ElectronicsSmartphone10300
ElectronicsLaptop5800
Home AppliancesMicrowave7150
Home AppliancesRefrigerator31200
ClothingT-Shirt2015
ClothingJeans1040
ElectronicsHeadphones1550
Home AppliancesBlender8100
1
Step 1: Create a new calculated measure named 'Total Revenue' in Power BI.
Total Revenue = SUMX(Sales, Sales[QuantitySold] * Sales[UnitPrice])
Expected Result
The measure calculates total revenue for all sales rows by multiplying quantity and price, then summing.
2
Step 2: Create a table visual in Power BI with 'ProductCategory' as rows and the 'Total Revenue' measure as values.
Table visual configuration: Rows = ProductCategory, Values = Total Revenue
Expected Result
The table shows total revenue for each product category.
3
Step 3: Verify the total revenue values by manually calculating for one category, e.g., Electronics.
Electronics revenue = (10*300) + (5*800) + (15*50) = 3000 + 4000 + 750 = 7750
Expected Result
The Electronics category shows a total revenue of 7750.
Final Result
ProductCategory | Total Revenue
----------------|--------------
Electronics     | 7750
Home Appliances | 5450
Clothing        | 700
Electronics category generates the highest revenue of 7750.
Home Appliances follow with 5450 total revenue.
Clothing category has the lowest revenue of 700.
Bonus Challenge

Create a measure that calculates total revenue only for products where QuantitySold is greater than 5.

Show Hint
Use SUMX with a FILTER inside it: SUMX(FILTER(Sales, Sales[QuantitySold] > 5), Sales[QuantitySold] * Sales[UnitPrice])