Summarizecolumns with rename of column - Power BI
community.powerbi.com › t5 › DesktopSep 12, 2018 · I want to rename the column to something else with DAX below. the cntry_code column to "Country Name". EVALUATE SUMMARIZECOLUMNS ( OPTMZ_GRP [cntry_code], "column a", SUM ('hcec_sales' [total_sales] ) ) I've tried the addsolumns but that gave me 2 of the same columns. EVALUATE ADDCOLUMNS ( SUMMARIZECOLUMNS ( OPTMZ_GRP [cntry_code], ), "total_sales", SUM ('hcec_sales' [total_sales] ) ), "Country Name", OPTMZ_GRP_BR_CURR_AIRPT [cntry_iso_cde] )
SUMMARIZE – DAX Guide
dax.guide › summarizeJan 18, 2023 · The GROUP BY condition of a SQL statement is natively implemented by SUMMARIZE in DAX. This article shows how to use SUMMARIZE and an alternative syntax to group data. » Read more. From SQL to DAX: Projection. This article describes projection functions and techniques in DAX, showing the differences between SELECTCOLUMNS, ADDCOLUMNS, and SUMMARIZE.
SUMMARIZECOLUMNS – DAX Guide
dax.guide › summarizecolumnsJan 18, 2023 · -- SUMMARIZECOLUMNS is the primary querying function in DAX -- It provides most querying features in a single function: -- First set of arguments are the groupby columns -- Second set are the filters -- Third set are additional columns added to the resultset EVALUATE SUMMARIZECOLUMNS ( 'Product'[Brand], 'Date'[Calendar Year], TREATAS ( { "CY 2008", "CY 2009" }, 'Date'[Calendar Year] ), TREATAS ( { "Red", "Blue" }, 'Product'[Color] ), "Amount", [Sales Amount], "Qty", SUM ( Sales[Quantity] ) )