0
0
Power BIbi_tool~15 mins

CALCULATE function introduction 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 see the total sales amount but only for the 'East' region. They want to understand how sales perform in that specific area.
📊 Data: You have a sales table with columns: Date, Region, Product, Quantity, and SalesAmount.
🎯 Deliverable: Create a measure using the CALCULATE function to show total sales for the East region and build a card visualization displaying this value.
Progress0 / 3 steps
Sample Data
DateRegionProductQuantitySalesAmount
2024-01-01EastApples10100
2024-01-02WestOranges550
2024-01-03EastBananas770
2024-01-04NorthApples330
2024-01-05EastOranges880
2024-01-06SouthBananas660
2024-01-07WestApples440
2024-01-08EastBananas990
1
Step 1: Create a new measure in Power BI Desktop.
Total Sales East = CALCULATE(SUM(Sales[SalesAmount]), Sales[Region] = "East")
Expected Result
A measure named 'Total Sales East' that sums SalesAmount only for rows where Region is East.
2
Step 2: Add a Card visualization to the report canvas.
Drag the 'Total Sales East' measure to the Card's 'Values' field.
Expected Result
The Card shows the total sales amount for the East region, which is 340.
3
Step 3: Verify the calculation by summing SalesAmount for East region in the sample data.
100 + 70 + 80 + 90 = 340
Expected Result
The Card visualization displays 340, confirming the measure works correctly.
Final Result
-------------------------
|      Total Sales East  |
|          340           |
-------------------------
The CALCULATE function filters data to only include the East region.
Total sales for the East region is 340 based on the sample data.
This measure can be reused in other visuals to analyze East region sales.
Bonus Challenge

Create a measure that calculates total sales for the East region but only for the product 'Bananas'.

Show Hint
Use CALCULATE with two filter conditions: Sales[Region] = "East" and Sales[Product] = "Bananas".