20 Essential DAX Functions Every Data Analyst and Power BI Developer Should Know for a Successful Interview
1. SUM: The SUM function calculates the sum of a column or expression for the rows that meet a specified filter criteria. Total Sales Amount = SUM(Sales[Sales Amount]) In this example, the SUM function calculates the total sales amount for the Sales[Sales Amount] column in the sales table. 2. CALCULATE: The CALCULATE function modifies the filter context of a DAX expression by applying additional filter criteria. Total Sales Amount for 2022 = CALCULATE(SUM(Sales[Sales Amount]), Sales[Year] = 2022) In this example, the CALCULATE function calculates the total sales amount for the Sales[Sales Amount] column in the sales table, but only for the rows where the Sales[Year] column equals 2022. 3. FILTER: The FILTER function returns a table that contains a subset of the rows from a specified table that meet a specified filter criteria. Total Sales Amount by Category = SUMX( FILTER( Product, [Selected Category] = "All" || ...