How To Add A New Measure In Power Bi

How to Add a New Measure in Power BI

Adding a new measure in Power BI allows you to perform calculations and create new insights based on your data. Measures are used to aggregate, summarize, or perform calculations on the data fields in your Power BI dataset. Here’s a step-by-step guide on how to add a new measure in Power BI with examples:

  1. Open Power BI Desktop or go to the Power BI service.
  2. Connect to your data source and load the data into Power BI.
  3. Navigate to the “Report” or “Data” view, depending on where you want to add the measure.
  4. Locate the fields or columns you want to use in the measure.
  5. Right-click on an empty space in the “Fields” pane or the empty area of a table or visualization.
  6. Select “New Measure” from the context menu.
  7. A formula bar will appear. Write the formula for your measure in the formula bar, using the DAX (Data Analysis Expressions) language. For example, to calculate the total sales amount, you can write:
SalesAmount = SUM(Sales[Amount])

In this example, “Sales” is the name of the table and “Amount” is the column within that table.

  1. Press Enter or click outside the formula bar to create the measure.
  2. The new measure will be added to the “Fields” pane or the table where you inserted it.
  3. You can now use the measure in calculations, visualizations, or as a filter in Power BI.

Here’s another example to illustrate how to create a measure:

AveragePrice = AVERAGE(Products[Price])

In this example, “Products” is the name of the table and “Price” is the column containing the price of each product.

Remember to use the appropriate DAX functions and syntax for your desired calculation.

That’s it! You have successfully added a new measure in Power BI. Now you can leverage the measure to gain valuable insights from your data.

Note: Power BI provides a wide range of built-in DAX functions that you can utilize to create custom measures. Understanding these functions and the DAX language will greatly enhance your ability to analyze and visualize data in Power BI.

Leave a comment