Some DAX functions return tables. Use them in New table to store a summary, or inside measures as the table an iterator walks.
- SUMMARIZE(Sales, Product[Category], "Sales", [Total Sales]) groups Sales by category and adds a Sales column. Group columns can come from related tables.
- ADDCOLUMNS(VALUES(Store[Region]), "Sales", [Total Sales]) starts from a list and adds columns row by row. Measures inside it follow each row, thanks to context transition. Many people prefer ADDCOLUMNS over SUMMARIZE for calculated columns, because it's easier to reason about.
- SELECTCOLUMNS(Store, "Store", Store[Store], "Region", Store[Region]) keeps just the columns you name, renaming them if you like.
Calculated tables are computed at refresh, not when a reader clicks a slicer. The edge case: groups with a blank value, such as customers with no segment, become a row of their own.
Category Summary = SUMMARIZE(Sales, Product[Category], "Sales", [Total Sales])
Region Summary = ADDCOLUMNS(VALUES(Store[Region]), "Sales", [Total Sales], "Orders", [Order Count])
Group, then add columns.