Iterator functions evaluate an expression for each row of a table and then aggregate the results. SUMX(Sales, Sales[Quantity] * Sales[UnitPrice]) multiplies quantity by unit price for every row and sums the result, which is essential when the value you want to aggregate is not a single column. Other common iterators include AVERAGEX, COUNTX, MINX, MAXX, RANKX, FILTER, and ADDCOLUMNS. Iterators create row context and are the primary mechanism for row-level calculations outside of calculated columns.
Ranking is a frequent analytical need. RANKX(ALL(Products), [Total Sales], , DESC, Dense) returns the rank of each product by sales across the entire product table, ignoring any filters. You can wrap this inside a measure and filter to rank less than or equal to 10 to dynamically produce a "top 10 products" visual. For a rank within a category, filter the table inside RANKX so each row only competes with peers sharing the same category. The PERCENTILEX.INC function similarly takes an iterator and a probability (such as 0.9 for the 90th percentile), making it useful for percentile-based analyses.
Table-shaping functions build virtual tables that you can pass into iterators or use inside CALCULATE. ADDCOLUMNS(Products, "Sales", [Total Sales]) adds a calculated column at query time without bloating the model. SUMMARIZE groups and aggregates, while SUMMARIZECOLUMNS is engine-optimized for visuals and respects filter context automatically, making it the preferred choice inside measures that drive visuals. GROUPBY requires an iterator like MAXX to materialize values and is less common. Set operations include UNION to stack tables with the same schema, EXCEPT to subtract one table from another, and INTERSECT to find common rows. GENERATE differs from CROSSJOIN by evaluating an expression per row of the outer table, allowing a measure to be evaluated per outer row. GENERATESERIES creates a single-column numeric table useful for dynamic axes such as NPS buckets.