Data Analysis Expressions (DAX) is a powerful formula language used in Power BI to create custom calculations and aggregations. Below is a comprehensive list of 50 useful DAX functions, categorized by their primary use case, with brief descriptions and examples to help you leverage them effectively in Power BI.

Aggregation Functions
These functions perform calculations on a set of values and return a single value.
- SUM
- Adds all numbers in a column.
- Example: Total Sales = SUM(Sales[Amount])
- AVERAGE
- Calculates the average of numbers in a column.
- Example: Avg Sales = AVERAGE(Sales[Amount])
- MIN
- Returns the smallest value in a column.
- Example: Min Price = MIN(Products[Price])
- MAX
- Returns the largest value in a column.
- Example: Max Price = MAX(Products[Price])
- COUNT
- Counts non-blank values in a column.
- Example: Total Orders = COUNT(Orders[OrderID])
- COUNTA
- Counts non-blank values in a column, including text.
- Example: Customer Count = COUNTA(Customers[Name])
- COUNTBLANK
- Counts blank values in a column.
- Example: Blank Entries = COUNTBLANK(Sales[Amount])
- SUMX
- Iterates over a table and sums the result of an expression.
- Example: Total Profit = SUMX(Sales, Sales[Revenue] – Sales[Cost])
- AVERAGEX
- Calculates the average of an expression over a table.
- Example: Avg Profit = AVERAGEX(Sales, Sales[Revenue] – Sales[Cost])
- MAXX
- Returns the maximum value of an expression over a table.
- Example: Max Profit = MAXX(Sales, Sales[Revenue] – Sales[Cost])
Date and Time Functions
These functions help manipulate and calculate dates and times.
- DATE
- Creates a date from year, month, and day.
- Example: Custom Date = DATE(2023, 12, 31)
- TODAY
- Returns the current date.
- Example: Current Date = TODAY()
- NOW
- Returns the current date and time.
- Example: Current Time = NOW()
- DATEDIFF
- Calculates the difference between two dates in specified units (e.g., days, months).
- Example: Days Between = DATEDIFF(Sales[OrderDate], Sales[ShipDate], DAY)
- EOMONTH
- Returns the last day of the month for a given date.
- Example: End of Month = EOMONTH(Sales[OrderDate], 0)
- YEAR
- Extracts the year from a date.
- Example: Order Year = YEAR(Sales[OrderDate])
- MONTH
- Extracts the month from a date.
- Example: Order Month = MONTH(Sales[OrderDate])
- DAY
- Extracts the day from a date.
- Example: Order Day = DAY(Sales[OrderDate])
- WEEKDAY
- Returns the day of the week (1-7) for a date.
- Example: Day of Week = WEEKDAY(Sales[OrderDate], 2)
- TOTALYTD
- Calculates the year-to-date total for an expression.
- Example: YTD Sales = TOTALYTD(SUM(Sales[Amount]), Sales[OrderDate])
Filter Functions
These functions manipulate and filter data contexts.
- FILTER
- Returns a table filtered by a condition.
- Example: High Sales = FILTER(Sales, Sales[Amount] > 1000)
- ALL
- Removes filters from a table or column.
- Example: Total Sales All = CALCULATE(SUM(Sales[Amount]), ALL(Sales))
- ALLEXCEPT
- Removes filters except for specified columns.
- Example: Sales by Region = CALCULATE(SUM(Sales[Amount]), ALLEXCEPT(Sales, Sales[Region]))
- CALCULATE
- Evaluates an expression in a modified filter context.
- Example: Filtered Sales = CALCULATE(SUM(Sales[Amount]), Sales[Region] = “West”)
- CALCULATETABLE
- Returns a table with modified filter context.
- Example: West Sales Table = CALCULATETABLE(Sales, Sales[Region] = “West”)
- KEEPFILTERS
- Preserves existing filters while applying new ones.
- Example: Filtered Sales = CALCULATE(SUM(Sales[Amount]), KEEPFILTERS(Sales[Category] = “Electronics”))
- SELECTEDVALUE
- Returns the value of a column when only one value is filtered.
- Example: Selected Region = SELECTEDVALUE(Sales[Region])
- VALUES
- Returns a single-column table of unique values.
- Example: Unique Regions = VALUES(Sales[Region])
- DISTINCT
- Returns a single-column table of distinct values.
- Example: Distinct Products = DISTINCT(Products[ProductName])
- RELATEDTABLE
- Returns a related table based on a relationship.
- Example: Related Sales = RELATEDTABLE(Sales)
Logical Functions
These functions handle conditional logic.
- IF
- Returns one value if a condition is true, another if false.
- Example: Sales Status = IF(Sales[Amount] > 1000, “High”, “Low”)
- SWITCH
- Evaluates an expression and returns a value based on matching conditions.
- Example: Region Label = SWITCH(Sales[Region], “West”, “W”, “East”, “E”, “Other”)
- AND
- Checks if two conditions are true.
- Example: High Value = IF(AND(Sales[Amount] > 1000, Sales[Quantity] > 10), “Yes”, “No”)
- OR
- Checks if at least one condition is true.
- Example: Special Order = IF(OR(Sales[Amount] > 5000, Sales[Priority] = “High”), “Special”, “Normal”)
- NOT
- Reverses a logical condition.
- Example: Non-West Sales = CALCULATE(SUM(Sales[Amount]), NOT Sales[Region] = “West”)
Text Functions
These functions manipulate text data.
- CONCATENATE
- Combines two text strings.
- Example: Full Name = CONCATENATE(Customers[FirstName], ” ” & Customers[LastName])
- LEFT
- Returns the leftmost characters of a string.
- Example: First 3 Chars = LEFT(Products[ProductCode], 3)
- RIGHT
- Returns the rightmost characters of a string.
- Example: Last 3 Chars = RIGHT(Products[ProductCode], 3)
- MID
- Returns a substring from a string.
- Example: Middle Code = MID(Products[ProductCode], 2, 3)
- FIND
- Returns the starting position of a string within another string.
- Example: Position of Dash = FIND(“-“, Products[ProductCode])
Mathematical Functions
These functions perform mathematical operations.
- ROUND
- Rounds a number to a specified number of digits.
- Example: Rounded Sales = ROUND(Sales[Amount], 2)
- DIVIDE
- Performs division and handles divide-by-zero errors.
- Example: Profit Margin = DIVIDE(Sales[Profit], Sales[Revenue], 0)
- ABS
- Returns the absolute value of a number.
- Example: Absolute Profit = ABS(Sales[Profit])
- SQRT
- Returns the square root of a number.
- Example: Root Value = SQRT(Sales[Quantity])
- POWER
- Raises a number to a specified power.
- Example: Squared Sales = POWER(Sales[Amount], 2)
Relationship Functions
These functions manage relationships between tables.
- RELATED
- Retrieves a value from a related table.
- Example: Product Name = RELATED(Products[ProductName])
- USERELATIONSHIP
- Activates an inactive relationship for a calculation.
- Example: Sales by Ship Date = CALCULATE(SUM(Sales[Amount]), USERELATIONSHIP(Sales[ShipDate], Calendar[Date]))
Statistical Functions
These functions perform statistical analysis.
- RANKX
- Ranks items based on an expression.
- Example: Sales Rank = RANKX(ALL(Sales), Sales[Amount])
- STDEV.P
- Calculates the standard deviation for an entire population.
- Example: Sales Std Dev = STDEV.P(Sales[Amount])
- VAR.P
- Calculates the variance for an entire population.
- Example: Sales Variance = VAR.P(Sales[Amount])
Conclusion
These 50 DAX functions are the backbone of advanced data modeling and analysis in Power BI. By mastering these functions, you can create dynamic reports, find insights, and handle complex business scenarios. Experiment with these functions in your Power BI models to unlock their full potential.
If you want to watch Power BI Basic to Advanced video tutorial, below you have the paly list link.
Power BI Basic to Advanced: Watch Now

