0
0
Power BIbi_tool~8 mins

CALCULATE function introduction in Power BI - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - CALCULATE function introduction
Business Question

How can we find total sales for a specific product category using a flexible formula?

Sample Data
OrderIDProductCategorySalesAmountRegion
1001Electronics200East
1002Clothing150West
1003Electronics300East
1004Furniture400South
1005Clothing100West
1006Electronics250North
Dashboard Components
  • KPI Card: Total Sales
    Formula: Total Sales = SUM(Sales[SalesAmount])
    Result: 1400
  • KPI Card: Electronics Sales
    Formula: Electronics Sales = CALCULATE(SUM(Sales[SalesAmount]), Sales[ProductCategory] = "Electronics")
    Result: 750
  • Bar Chart: Sales by Product Category
    Shows total sales for each category: Electronics (750), Clothing (250), Furniture (400)
  • Table: Sales Details
    Shows all rows from sample data for detailed view
Dashboard Layout
+-------------------+-------------------+
|   Total Sales     | Electronics Sales |
|      (KPI)        |      (KPI)        |
+-------------------+-------------------+
|      Bar Chart: Sales by Category      |
|                                       |
+---------------------------------------+
|           Table: Sales Details         |
|                                       |
+---------------------------------------+
Interactivity

A slicer for ProductCategory lets you filter the whole dashboard. Selecting a category updates the KPI cards, bar chart, and table to show only that category's sales.

Self Check

If you add a filter for ProductCategory = Clothing, which components update and what is the new Electronics Sales KPI value?

Answer: The KPI cards, bar chart, and table update. The Electronics Sales KPI shows 0 because no Electronics sales remain after filtering for Clothing.

Key Result
Dashboard shows total sales and filtered sales by product category using CALCULATE function.