Inserting New Columns
AS
Aman Saurav
4 min read
#power-query
#columns
There are two primary ways to add columns in PowerBI: through Power Query (during data import) or DAX (after data load).
Method 1: Power Query (Recommended)
This is best for performance as the transformation happens before loading.
- Click Transform Data to open Power Query Editor.
- Go to the Add Column tab.
- Select Custom Column.
- Write your logic using M language (e.g.,
[Unit Price] * [Quantity]).
Method 2: DAX Calculated Column
Best if you need to use relationships to other tables.
- Go to Table View.
- Click New Column in the ribbon.
- Type your DAX formula:
Profit = Sales[Revenue] - Sales[Cost]
Prefer Power Query for static data cleanup and DAX for aggregations required at report time.