0
0
Power BIbi_tool~15 mins

Aggregations for performance in Power BI - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a business analyst at a retail company.
📋 Request: Your manager wants a report that shows total sales and average sales per customer by region and month. The dataset is large and slow to load. You need to improve report performance using aggregations.
📊 Data: You have a sales dataset with columns: Date, Region, CustomerID, SalesAmount.
🎯 Deliverable: Create a Power BI report with a table visual showing Region, Month, Total Sales, and Average Sales per Customer. Use aggregations to speed up the report.
Progress0 / 4 steps
Sample Data
DateRegionCustomerIDSalesAmount
2024-01-05NorthC001100
2024-01-15NorthC002150
2024-01-20SouthC003200
2024-02-10NorthC001120
2024-02-15SouthC004180
2024-02-20SouthC003220
2024-03-05NorthC002130
2024-03-10SouthC004210
2024-03-15NorthC001140
2024-03-20SouthC005190
1
Step 1: Create a new aggregated table in Power BI that groups sales by Region and Month, summing SalesAmount and counting distinct CustomerID.
AggregatedSales = SUMMARIZE(SalesData, SalesData[Region], "Month", FORMAT(SalesData[Date], "YYYY-MM"), "TotalSales", SUM(SalesData[SalesAmount]), "DistinctCustomers", DISTINCTCOUNT(SalesData[CustomerID]))
Expected Result
A new table with columns: Region, Month (YYYY-MM), TotalSales, DistinctCustomers.
2
Step 2: Create a calculated measure for Average Sales per Customer using the aggregated table.
AverageSalesPerCustomer = DIVIDE(SUM(AggregatedSales[TotalSales]), SUM(AggregatedSales[DistinctCustomers]))
Expected Result
A measure that calculates average sales per customer for each Region and Month.
3
Step 3: Build a table visual in Power BI with rows as Region and Month, and values as TotalSales and AverageSalesPerCustomer.
Visual configuration: Rows = AggregatedSales[Region], AggregatedSales[Month]; Values = AggregatedSales[TotalSales], AverageSalesPerCustomer measure
Expected Result
Table shows total sales and average sales per customer by region and month, loading faster due to aggregation.
4
Step 4: Test report performance by comparing load time before and after using the aggregated table.
No formula; observe report refresh and interaction speed.
Expected Result
Report loads noticeably faster with aggregated data.
Final Result
Region   | Month   | Total Sales | Avg Sales/Customer
-----------------------------------------------
North    | 2024-01 | 250         | 125.00
South    | 2024-01 | 200         | 200.00
North    | 2024-02 | 120         | 120.00
South    | 2024-02 | 400         | 200.00
North    | 2024-03 | 270         | 135.00
South    | 2024-03 | 400         | 200.00
North region has steady sales with average sales per customer around 125-135.
South region shows higher average sales per customer at 200 consistently.
Using aggregated data improves report loading speed significantly.
Bonus Challenge

Create a dynamic aggregation that updates automatically when new sales data is added, maintaining performance.

Show Hint
Use Power BI's Incremental Refresh feature and parameterize the aggregation table to refresh only recent data.