Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
10 views

DAX Functions

Uploaded by

hpatel63557
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

DAX Functions

Uploaded by

hpatel63557
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Comprehensive List of DAX Functions

1. Aggregation Functions

- SUM() - Returns the sum of a column. Example: SUM(Sales[Amount])

- SUMX() - Calculates the sum of an expression for each row in a table. Example: SUMX(Sales,

Sales[Quantity] * Sales[Price])

- AVERAGE() - Returns the average of a column. Example: AVERAGE(Sales[Amount])

- MIN() - Returns the minimum value from a column. Example: MIN(Sales[Amount])

- MAX() - Returns the maximum value from a column. Example: MAX(Sales[Amount])

- COUNT() - Counts non-empty rows in a column. Example: COUNT(Sales[OrderID])

- DISTINCTCOUNT() - Counts distinct values. Example: DISTINCTCOUNT(Sales[CustomerID])

2. Logical Functions

- IF() - Returns one value if TRUE, another if FALSE. Example: IF(Sales[Profit] > 1000, 'High', 'Low')

- SWITCH() - Evaluates an expression and returns a matching value. Example:

SWITCH(Sales[Region], 'North', 1, 'South', 2)

- AND() - Returns TRUE if all conditions are TRUE. Example: AND(Sales[Profit] > 1000,

Sales[Region] = 'North')

- OR() - Returns TRUE if any condition is TRUE. Example: OR(Sales[Profit] > 1000, Sales[Region] =

'North')

- NOT() - Reverses TRUE/FALSE. Example: NOT(Sales[Status] = 'Active')

3. Time Intelligence Functions

- DATE() - Creates a date. Example: DATE(2024, 12, 31)

- NOW() - Returns the current date and time. Example: NOW()

- TODAY() - Returns the current date. Example: TODAY()


- YEAR() - Extracts the year from a date. Example: YEAR(Sales[OrderDate])

- TOTALYTD() - Calculates Year-To-Date. Example: TOTALYTD(SUM(Sales[Amount]),

Sales[OrderDate])

4. Filter Functions

- CALCULATE() - Modifies the filter context. Example: CALCULATE(SUM(Sales[Amount]),

Sales[Region] = 'North')

- FILTER() - Returns a filtered table. Example: FILTER(Sales, Sales[Amount] > 1000)

- ALL() - Removes filters. Example: ALL(Sales[Region])

- VALUES() - Returns distinct values. Example: VALUES(Sales[Region])

5. Text Functions

- CONCATENATE() - Joins two strings. Example: CONCATENATE('Hello', 'World')

- LEFT() - Returns characters from the left. Example: LEFT(Sales[ProductName], 3)

- RIGHT() - Returns characters from the right. Example: RIGHT(Sales[ProductName], 3)

- UPPER() - Converts text to uppercase. Example: UPPER(Sales[ProductName])

6. Math & Statistical Functions

- ABS() - Returns the absolute value. Example: ABS(-50)

- ROUND() - Rounds a number. Example: ROUND(3.14159, 2)

- DIVIDE() - Divides two numbers. Example: DIVIDE(Sales[Amount], Sales[Quantity])

You might also like