0
0
Power BIbi_tool~15 mins

FILTER function 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 only for the 'East' region to understand its performance separately.
📊 Data: You have a sales data table with columns: Date, Region, Product, and Sales Amount.
🎯 Deliverable: Create a measure using the FILTER function to calculate total sales for the East region and build a card visualization to display this value.
Progress0 / 3 steps
Sample Data
DateRegionProductSales Amount
2024-01-01EastApples100
2024-01-02WestBananas150
2024-01-03EastOranges200
2024-01-04NorthApples120
2024-01-05SouthBananas130
2024-01-06EastBananas170
2024-01-07WestOranges160
2024-01-08NorthBananas110
1
Step 1: Create a new measure in Power BI to calculate total sales for the East region using the FILTER function.
Total Sales East = CALCULATE(SUM('Sales'[Sales Amount]), FILTER('Sales', 'Sales'[Region] = "East"))
Expected Result
The measure returns 470, which is the sum of sales amounts for East region rows (100 + 200 + 170).
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 value 470, representing total sales for the East region.
3
Step 3: Format the Card visualization for clarity.
Set the Card title to 'Total Sales - East Region' and increase font size for readability.
Expected Result
The Card clearly displays the total sales for East region with a descriptive title.
Final Result
-----------------------------
| Total Sales - East Region |
|                           |
|           470             |
-----------------------------
The East region generated total sales of 470 in the given period.
Using the FILTER function helps isolate data for specific regions easily.
This measure can be reused or combined with other filters for deeper analysis.
Bonus Challenge

Create a measure that calculates total sales for the East region but only for sales above 150.

Show Hint
Use FILTER with two conditions combined using &&: 'Sales'[Region] = "East" && 'Sales'[Sales Amount] > 150