5 DAX Business Scenarios for Power BI To Practice
1. Sales Performance Analysis
Scenario:A retail company wants to analyze its sales performance by comparing the current year's sales with the previous year's sales to understand growth trends.
DAX Calculation:
PreviousYearSales =
CALCULATE(
SUM(Sales[SalesAmount]),
SAMEPERIODLASTYEAR('Date'[Date])
)
SalesGrowth =
DIVIDE(
SUM(Sales[SalesAmount]) - [PreviousYearSales],
[PreviousYearSales]
)
Usage:This helps businesses track yearly sales growth and identify trends.
2. Customer Retention Rate
Scenario: A subscription-based company wants to calculate the retention rate by finding out how many customers from last year have renewed their subscription.
DAX Calculation:
RetainedCustomers =
CALCULATE(
DISTINCTCOUNT(Subscriptions[CustomerID]),
FILTER(
Subscriptions,
Subscriptions[SubscriptionYear] = MAX(Subscriptions[SubscriptionYear]) - 1
&& Subscriptions[CustomerID] IN VALUES(Subscriptions[CustomerID])
)
)
RetentionRate =
DIVIDE(
[RetainedCustomers],
DISTINCTCOUNT(Subscriptions[CustomerID])
)
Usage:Helps track customer loyalty and forecast future revenue.
3. Employee Productivity Score
Scenario: A company wants to measure employee productivity based on tasks completed and hours worked.
DAX Calculation:
领英推荐
ProductivityScore =
DIVIDE(
SUM(Tasks[CompletedTasks]),
SUM(Tasks[HoursWorked])
)
Usage: HR and management teams use this to identify top performers and improve workforce efficiency.
4. Inventory Turnover Ratio
Scenario: A manufacturing business wants to calculate how efficiently its inventory is being used by tracking how often stock is sold and replaced.
DAX Calculation:
InventoryTurnover =
DIVIDE(
SUM(Sales[SalesAmount]),
AVERAGE(Inventory[StockValue])
)
Usage: This helps optimize inventory levels and reduce holding costs.
5. Profit Margin Calculation
Scenario: A company wants to track its profitability by calculating the profit margin as a percentage of total sales.
DAX Calculation:
TotalProfit =
SUM(Sales[Revenue]) - SUM(Sales[Cost])
ProfitMargin =
DIVIDE(
[TotalProfit],
SUM(Sales[Revenue])
)
Usage: This metric is crucial for financial planning and pricing strategies.
Would you like a learn Power BI. Please click on our Youtube Channel ? ??