How To Calculate Average Of Multiple Columns In Power Bi

Calculating Average of Multiple Columns in Power BI

Power BI provides several ways to calculate the average of multiple columns. Here, we will discuss two popular methods:

Method 1: Using DAX Measures

DAX (Data Analysis Expressions) is a formula language used in Power BI to create custom calculations. To calculate the average of multiple columns using DAX measures, follow these steps:

  1. Open Power BI Desktop.
  2. Load your data source into Power BI.
  3. Create a new measure by right-clicking on the table name in the "Fields" pane and selecting "New Measure".
  4. In the formula bar, enter the following DAX formula to calculate the average:


    Average = AVERAGE(Table[Column1], Table[Column2], Table[Column3])


    Replace "Table" with the actual name of your table, and "Column1", "Column2", and "Column3" with the names of the columns you want to average.
  5. Press Enter to save the measure.

Method 2: Using Power Query Editor

Power Query Editor allows you to transform and shape your data before loading it into Power BI. To calculate the average of multiple columns using Power Query Editor, follow these steps:

  1. Open Power BI Desktop.
  2. Load your data source into Power BI.
  3. Click on the "Edit Queries" button in the Home tab.
  4. In the Power Query Editor, select the table you want to work with.
  5. Go to the "Add Column" tab and click on "Custom Column".
  6. In the "Custom Column" dialog box, enter a column name for the new column.
  7. In the "Custom column formula" input box, enter the following formula to calculate the average:


    ( [Column1] + [Column2] + [Column3] ) / 3


    Replace "Column1", "Column2", and "Column3" with the names of the columns you want to average.
  8. Click OK to save the custom column.
  9. Close the Power Query Editor and load the modified data into Power BI.

These are just two examples of how you can calculate the average of multiple columns in Power BI. The method you choose may vary depending on your specific requirements and data structure.

Read more

Leave a comment