0% found this document useful (0 votes)
7 views

Dax Functions

Uploaded by

syedraeespeer
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)
7 views

Dax Functions

Uploaded by

syedraeespeer
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/ 6

DOMAIN SPECIFIC FUNCTONS

Domain-Specific Notes:

- Sales & Marketing: Focus on time intelligence, aggregation, and filter functions to analyze trends,
performance metrics, and customer segmentation.

- Finance: Emphasize financial functions, statistical measures, and time-based calculations.

- Operations: Utilize aggregation, logical, and table functions for supply chain management, resource
allocation, and operational efficiency analysis.

- HR Analytics: Use filter, logical, and text functions to segment employee data, analyze performance
metrics, and calculate retention rates.

DOMAIN SPECIFIC DAX FUNCTONS

1. Time Intelligence

- CALENDAR / CALENDARAUTO: Create a date table.

- DATEADD: Shift dates forward or backward by a specified number of intervals.

- SAMEPERIODLASTYEAR: Compare data to the same period in the previous year.

- TOTALYTD: Calculate the year-to-date total.

- DATESYTD, DATESMTD, DATESQTD: Calculate year-to-date, month-to-date,


and quarter-to-date values.

- PARALLELPERIOD: Return a parallel period of time at the specified interval.

- PREVIOUSYEAR, PREVIOUSMONTH, PREVIOUSDAY: Get the previous year, month, or day.

- STARTOFYEAR, ENDOFYEAR: Get the start or end date of the year.

- EOMONTH: Get the end of the month.

2. Aggregation

- SUM: Calculate the sum of a column.

- SUMX: Calculate the sum of an expression over a table.

- AVERAGE: Calculate the average of a column.

- AVERAGEX: Calculate the average of an expression over a table.


- MIN, MAX: Return the minimum or maximum value in a column.

- COUNT, COUNTA: Count the number of rows or non-blank values.

- COUNTX: Count rows that meet a condition.

- DISTINCTCOUNT: Count the number of distinct values.

3. Filter and Row Context

- FILTER: Return a table filtered by an expression.

- ALL: Remove filters from a table or column.

- ALLEXCEPT: Remove filters from all columns except those specified.

- CALCULATE: Modify the filter context of an expression.

- RELATED: Retrieve related values from another table.

- RELATEDTABLE: Return a table related to the current row.

- EARLIER: Access an earlier row context within a nested row context.

4. Mathematical and Statistical

- ABS: Return the absolute value.

- DIVIDE: Safely perform division, handling division by zero.

- ROUND: Round a number to the specified number of digits.

- RANKX: Rank values in a column or expression.

- PERCENTILEX.INC, PERCENTILEX.EXC: Calculate percentiles over a table.

- MEDIANX: Return the median value of an expression over a table.

5. Text Functions

- CONCATENATE: Concatenate two text strings.

- CONCATENATEX: Concatenate text strings over a table with a delimiter.

- LEFT, RIGHT: Extract a substring from a text string.

- MID: Extract a substring from the middle of a text string.

- FIND: Find the position of a substring within a text string.

- REPLACE: Replace part of a text string with another string.


6. Logical Functions

- IF: Perform a logical test and return one value if true, another if false.

- SWITCH: Evaluate an expression against a list of values and return the corresponding result.

- AND, OR: Perform logical AND or OR operations.

- NOT: Reverse a logical value.

7. Table Functions

- UNION: Combine two or more tables.

- INTERSECT: Return the intersection of two tables.

- EXCEPT: Return the difference between two tables.

- ADDCOLUMNS: Add calculated columns to a table.

- SUMMARIZE: Create a summary table for the requested totals over a set of groups.

- VALUES: Return a one-column table of unique values in a column.

8. Date and Time

- YEAR, MONTH, DAY: Extract the year, month, or day from a date.

- HOUR, MINUTE, SECOND: Extract the hour, minute, or second from a time.

- DATEDIFF: Return the difference between two dates.

- TODAY, NOW: Return the current date or date and time.

- EDATE: Return the date that is the specified number of months before or after a date.

9. Financial

- XIRR: Return the internal rate of return for a series of cash flows.

- XNPV: Return the net present value for a series of cash flows.

- FV: Calculate the future value of an investment.

- PMT: Calculate the payment for a loan based on constant payments and interest rates.
10. Geospatial

- DISTANCE: Calculate the distance between two geographical points.

- GEOLOCATION: Convert a latitude and longitude to a geographical location.

DOMAIN-WISE DAX FUNCTIONS

1. Sales & Marketing


- CALCULATE: Modifies filter context for specific sales or marketing criteria.

- SUM: Aggregates total sales or revenue.

- DATEADD: Shifts dates to perform week-on-week, month-on-month, or year-on-year comparisons.

- SAMEPERIODLASTYEAR: Compares current period sales to the same period in the previous year.

- RANKX: Ranks products, regions, or campaigns based on performance metrics.

- TOPN: Identifies top-performing products or customer segments.

- DIVIDE: Safely computes percentages like growth rates.

- FILTER: Focuses on specific segments or campaigns.

- AVERAGE: Computes average sales or revenue.

- COUNTROWS: Counts the number of transactions or customers.

- CROSSFILTER: Modifies relationships between sales and product tables.

- IF: Applies conditional logic to calculate metrics like discounts.

- CONCATENATE: Combines text for custom labels or customer insights.

- RELATED: Fetches related data from another table.

- USERELATIONSHIP: Activates inactive relationships between tables.

2. Finance
- CALCULATE: Applies custom filter contexts for financial metrics like profit, loss, or revenue.

- TOTALYTD: Calculates year-to-date metrics for financial statements.

- DATEADD: Compares financial data month-on-month or year-on-year.

- DIVIDE: Safely performs division for financial ratios.


- SUMX: Aggregates financial metrics like net income or expenses.

- RANKX: Ranks departments, investments, or financial entities by performance.

- XIRR: Calculates the internal rate of return for irregular cash flows.

- XNPV: Calculates the net present value of future cash flows.

- AVERAGEA: Calculates averages including non-numeric data.

- MEDIANX: Computes the median of financial metrics.

- LOOKUPVALUE: Retrieves values based on specified criteria.

- SWITCH: Implements complex conditional calculations for expenses or revenue streams.

- ISBLANK: Checks for missing financial data.

- FORMAT: Formats numbers or dates for financial reports.

- EOMONTH: Returns the end of the month for financial period calculations.

- YEAR: Extracts the year from a date for time-based reporting.

3. Operations
- CALCULATE: Adjusts filter contexts to evaluate metrics like order fulfillment or machine efficiency.

- SUMX: Calculates total downtime, defects, or inventory turnover.

- AVERAGEX: Computes averages for operational metrics like lead times or machine utilization.

- FILTER: Isolates specific periods, products, or machines for analysis.

- RANKX: Ranks operational units or suppliers based on performance.

- ALL: Removes filters to calculate overall operational metrics like total production output.

- EARLIER: References previous rows for sequential calculations like lead time analysis.

- COUNTAX: Counts rows meeting certain conditions, like defects or delays.

- ISNUMBER: Checks if a value is numeric for validating data.

- MAXX: Returns the maximum value from a table for metrics like delivery time.

- VALUES: Returns distinct values for filtering operational categories.

- PATH: Returns lineage in a parent-child hierarchy, useful in supply chain hierarchies.

- RELATEDTABLE: Returns a related table for detailed transaction or production data.

- BLANK: Handles missing or incomplete operational data.


4. HR Analytics
- CALCULATE: Measures HR metrics like attrition rates under specific conditions.

- SUM: Aggregates HR-related metrics like total headcount or compensation.

- DISTINCTCOUNT: Counts distinct employees or HR events like promotions.

- FILTER: Applies conditions to focus on specific departments or roles.

- AVERAGEX: Calculates average performance scores or engagement metrics.

- RANKX: Ranks employees, departments, or job roles by performance or attrition risk.

- DATEADD: Compares HR metrics over different periods, such as year-on-year.

- SWITCH: Implements multiple conditions to categorize employees by risk or performance.

- UNICHAR: Returns Unicode characters for custom formatting in HR reports.

- DATESBETWEEN: Returns dates between specified start and end dates for tenure analysis.

- CONTAINS: Checks if a table contains specific values, useful for filtering employee records.

- NORM.S.DIST: Returns the standard normal distribution for calculating standardized scores.

- ALLSELECTED: Removes filters from the selected context for interactive dashboards.

- HASONEVALUE: Validates data by checking for a single value in a column.

- VAR: Defines variables to simplify complex DAX formulas.

- ISEMPTY: Ensures HR datasets are complete before analysis.

You might also like