0% found this document useful (0 votes)
154 views4 pages

Power BI Dax Function

The document lists the 20 most commonly asked DAX calculations for data analyst interviews, providing formulas for metrics such as Total Sales, Profit Margin, and Customer Retention. Each calculation is presented with its corresponding DAX formula, which can be used to analyze sales data effectively. The document serves as a useful reference for preparing for data analysis interviews.

Uploaded by

medachydesir19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views4 pages

Power BI Dax Function

The document lists the 20 most commonly asked DAX calculations for data analyst interviews, providing formulas for metrics such as Total Sales, Profit Margin, and Customer Retention. Each calculation is presented with its corresponding DAX formula, which can be used to analyze sales data effectively. The document serves as a useful reference for preparing for data analysis interviews.

Uploaded by

medachydesir19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Data Analyst

MostAskedInterview Questions
DAX
20 Most Commonly Asked DAX Calculations in Interviews

1. Total Sales
Total Sales = SUM(Sales[SalesAmount])

2. Total Profit
Total Profit = SUM(Sales[Profit])

3. Profit Margin %
Profit Margin % = DIVIDE([Total Profit], [Total Sales], 0)

4. Distinct Customers
Distinct Customers = DISTINCTCOUNT(Sales[CustomerID])

5. Average Sales per Customer


Avg Sales per Customer = DIVIDE([Total Sales], [Distinct Customers], 0)

6. Total Orders
Total Orders = COUNT(Sales[OrderID])

7. Average Order Value


Avg Order Value = DIVIDE([Total Sales], [Total Orders], 0)

8. Cumulative Sales (Running Total)


Cumulative Sales =
CALCULATE(
[Total Sales],
FILTER(
ALLSELECTED(Date[Date]),
Date[Date] <= MAX(Date[Date])
)
)

9. Sales Last Year


Sales LY =
CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR(Date[Date])
)

10. YoY Growth %


YoY Growth % =
DIVIDE([Total Sales] - [Sales LY], [Sales LY], 0)

11. Sales Previous Month


Sales PM =
CALCULATE(
[Total Sales],
PREVIOUSMONTH(Date[Date])
)

12. MoM Growth %


MoM Growth % =
DIVIDE([Total Sales] - [Sales PM], [Sales PM], 0)

13. Sales for Selected Category


Food Sales =
CALCULATE([Total Sales], Sales[Category] = "Food")

14. Top 5 Products by Sales


Create a calculated table:
TopProducts =
TOPN(5, SUMMARIZE(Sales, Sales[ProductName], "TotalSales", [Total
Sales]), [Total Sales], DESC)

15. Customer Retention Flag


Is Returning Customer =
IF(CALCULATE(COUNT(Sales[OrderID]), ALLEXCEPT(Sales,
Sales[CustomerID])) > 1, 1, 0)

16. % of Total Sales


% of Total Sales =
DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(Sales)), 0)

17. Rank by Revenue


Sales Rank =
RANKX(ALL(Sales[ProductName]), [Total Sales], , DESC)

18. Customer Churn %


Churn Rate =
DIVIDE([Lost Customers], [Total Customers Last Month], 0)

19. Time to First Purchase


First Purchase Date =
CALCULATE(
MIN(Sales[OrderDate]),
ALLEXCEPT(Sales, Sales[CustomerID])
)
20.IF + SWITCH for KPI Color Logic
KPIStatus = SWITCH(

TRUE(), [Total Sales] >= 1000000,


"Green", [Total Sales] >= 500000,
"Yellow", "Red"

You might also like