0
0
Power BIbi_tool~8 mins

Why DAX powers calculations in Power BI - Dashboard Impact

Choose your learning style9 modes available
Dashboard Mode - Why DAX powers calculations in Power BI
Business Question

How can we use DAX formulas in Power BI to calculate total sales, average sales, and sales growth to better understand our business performance?

Sample Data
MonthSalesCost
110060
215090
3200120
4180110
5220130
Dashboard Components
  • KPI Card: Total Sales
    Formula: Total Sales = SUM(SalesData[Sales])
    Result: 850
  • KPI Card: Average Sales
    Formula: Average Sales = AVERAGE(SalesData[Sales])
    Result: 170
  • KPI Card: Total Cost
    Formula: Total Cost = SUM(SalesData[Cost])
    Result: 510
  • Calculated Measure: Sales Growth from Previous Month
    Formula:
    Sales Growth = VAR CurrentMonth = MAX(SalesData[Month]) VAR CurrentSales = CALCULATE(SUM(SalesData[Sales]), SalesData[Month] = CurrentMonth) VAR PrevMonth = CALCULATE(MAX(SalesData[Month]), FILTER(SalesData, SalesData[Month] < CurrentMonth)) VAR PrevSales = CALCULATE(SUM(SalesData[Sales]), SalesData[Month] = PrevMonth) RETURN IF(NOT(ISBLANK(PrevSales)), (CurrentSales - PrevSales) / PrevSales, BLANK())
    Example for Month 2: (150 - 100) / 100 = 0.5 (50%)
  • Line Chart: Sales Over Months
    X-axis: Month
    Y-axis: Sales
    Shows sales trend from month 1 to 5
Dashboard Layout
+----------------------+----------------------+----------------------+
|   Total Sales (KPI)  |  Average Sales (KPI) |   Total Cost (KPI)   |
+----------------------+----------------------+----------------------+
|                                                      
|                 Line Chart: Sales Over Months         
|                                                      
+------------------------------------------------------+
|               Sales Growth (Table or Card)            
+------------------------------------------------------+
Interactivity

A slicer for Month allows filtering the data shown in all components. Selecting a specific month updates the KPIs and the sales growth measure to reflect that month's data. The line chart updates to show sales only up to the selected month. This helps users focus on specific time periods.

Self Check

If you add a filter to show only months from 3 to 5, which components update and how?

  • All KPI cards update to show totals and averages for months 3, 4, and 5 only.
  • The line chart shows sales data only for months 3, 4, and 5.
  • The sales growth measure recalculates growth between these months.
Key Result
A Power BI dashboard showing total sales, average sales, total cost, sales growth, and sales trend over months using DAX calculations.