How to Convert Negative Value to Positive in Power BI

Cody Schneider8 min read

Working with financial data often means you’ll encounter negative numbers representing costs, refunds, or expenses. While accurate, these negative values can sometimes make calculations or visualizations confusing. In Power BI, converting negative values to their positive equivalent, known as finding the absolute value, is a common and essential task for clear reporting.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

This tutorial will guide you through three different methods for converting negative numbers to positive numbers in Power BI. We’ll cover using DAX functions for dynamic calculations and Power Query for upfront data transformation, so you can choose the best approach for your specific needs.

Why Convert Negative Values to Positive?

Before jumping into the "how," let's quickly cover the "why." You might need to make a number positive for several practical reasons in business analysis:

  • Simplified Totals: Imagine you have a Sales column (positive) and a Returns column (negative). If you want to calculate the total value of returned products, you need to sum the positive version of those numbers, not the negative ones.
  • Clearer Visualizations: When comparing expenses against a budget in a bar chart, showing both as positive values makes for a much easier visual comparison of magnitude. A chart with bars going in opposite directions can be harder to interpret at a glance.
  • KPI Calculations: Many key performance indicators require absolute values. For example, when calculating variance, whether it’s over or under budget, you might be interested in the size of the variance, not its direction.
  • Data Consistency: Sometimes, for specific models, you may need a column of values to be consistently positive for a formula to work correctly.

Fortunately, Power BI provides several straightforward ways to handle this conversion, whether you’re working with individual rows of data or aggregated totals.

Method 1: The ABS Function in DAX

The most direct way to convert a negative number into a positive one within your data model is by using the DAX (Data Analysis Expressions) function ABS(). This function simply returns the absolute value of a number, stripping away the negative sign.

You can use ABS() in both calculated columns and measures, depending on what you need to achieve.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Using ABS() in a Calculated Column

A calculated column creates a new column in your table where the calculation is performed for each row. This is useful when you want to see the positive value alongside the original or use it for slicing and filtering.

Let's say you have a table named 'Sales' with a column called 'RefundAmount' that contains negative values. Here’s how to create a new column with the positive values:

  1. From the Report or Data view in Power BI Desktop, select your 'Sales' table in the Fields pane.
  2. Navigate to the Table tools tab in the ribbon and click on New column.
  3. In the formula bar that appears, type the following DAX formula:
  4. Press Enter to create the column.

You will now see a new column named 'Positive Refund Amount' in your table, where every value is positive, allowing you to easily sum it or use it in other row-level calculations.

When to use this method: Use a calculated column when you need a permanent, row-by-row positive version of a number that you can see in your data table and use to filter or categorize data.

Using ABS() in a Measure

A measure is a calculation that is performed on-the-fly based on the context of your report (like filters from a slicer or chart axis). Measures are perfect for calculating aggregated values in your visuals, like totals for cards, charts, and tables.

If you want to show the total value of refunds in a card visual, you'd want to sum the absolute value of each refund.

There are two primary ways to do this in a measure:

1. Summing the Absolute Value of Each Row with SUMX

The SUMX function iterates through a table row by row, performing a calculation (like ABS()), and then sums up the results. This is often the most accurate method for totals.

  1. Right-click on your 'Sales' table in the Fields pane and select New measure.
  2. Enter this DAX formula:
  3. Press Enter.

This measure first makes the 'RefundAmount' positive for every single row and then sums them up. This avoids any negative and positive values cancelling each other out.

2. Taking the Absolute Value of the Sum

Alternatively, you could first sum the column and then take the absolute value of the final result.

  1. Right-click on your 'Sales' table and select New measure.
  2. Enter this formula:

Important Distinction: These two measures can produce very different results. SUMX(..., ABS(...)) is usually what you want. It sums the magnitudes. ABS(SUM(...)) calculates the net total first and then makes the final number positive. For a column with -$100, -$50, and +$20, the first measure would return 170, while the second would return 130 (the absolute value of -130).

When to use a measure: Use a measure when you need to display dynamic, aggregated totals in your report visuals. It's more efficient and the standard best practice for dashboard reporting.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Power Query's "Absolute Value" Transformation

If you prefer to clean and transform your data before it even loads into your Power BI data model, the Power Query Editor is the place to do it. This method alters the data at the source level, so every report you build from this dataset will use the transformed data.

This is an excellent option if you decide that a certain column should always contain positive values for any and all analysis.

Transforming a Column In-Place

This changes the original column directly. Use this if you don't need to keep the original negative numbers.

  1. On the Home ribbon in Power BI Desktop, click Transform data to open the Power Query Editor.
  2. In the Queries pane on the left, select the table containing your negative numbers.
  3. Select the column you want to convert (e.g., 'RefundAmount').
  4. Go to the Transform tab in the ribbon. In the Number column section, click the Standard dropdown, and then select Absolute Value.

The numbers in your selected column will instantly be converted to their positive counterparts.

Creating a New Column with Absolute Values

If you want to keep the original column, you can add a new one with the positive values instead.

  1. Follow steps 1 and 2 from above.
  2. Select the column you want to convert.
  3. Go to the Add Column tab instead of the Transform tab. In the From number section, click the Standard dropdown and select Absolute Value.

Power Query will add a new column named "Absolute Value" to your table, containing the positive numbers, while preserving your original column.

When to use this method: Use Power Query when you consider the conversion a data cleansing or preparation step. It simplifies your DAX model by handling the logic before analysis begins, which can be cleaner and more efficient.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 3: Conditional Logic with the IF Function

A slightly more manual but highly flexible way to convert numbers is by using conditional logic with an IF function. The logic is simple: if a number is less than zero, multiply it by -1 to make it positive, otherwise, leave it as is.

This approach is helpful if you have more complex rules, but for a simple absolute value, ABS() or the Power Query transform is more efficient.

You can apply this logic in both DAX and Power Query.

Using the IF Function in a DAX Calculated Column

Positive Value (IF) = IF('Sales'[RefundAmount] < 0, 'Sales'[RefundAmount] * -1, 'Sales'[RefundAmount])

Using a Conditional Column in Power Query

While you could use the "Conditional Column" button, it's often faster to write this logic in a Custom Column.

  1. In the Power Query Editor, go to the Add Column tab and click Custom Column.
  2. Name your new column (e.g., "PositiveValueCustom").
  3. Enter the following M formula:
  4. Click OK.

When to use this method: Use an IF statement when your logic is more complex than a simple sign flip. For converting a standard negative value to positive, the dedicated ABS() function and "Absolute Value" transformation are cleaner and signify your intent more clearly.

Final Thoughts

As we've seen, Power BI offers multiple robust methods for converting negative values to positive ones. Choosing between Power Query for data preparation or DAX for dynamic analysis ultimately depends on your specific reporting goals. The ABS() function in DAX is the quickest for analysis, while the Power Query transform is ideal for permanently cleaning your data at the source.

Mastering these small but crucial data transformations is a key part of building clear and effective reports. That said, creating formulas, managing data models, and memorizing functions can be time-consuming. At Graphed , we’ve built an AI data analyst that handles these steps for you. Instead of writing DAX, you can simply connect your data and ask in plain English, "Show me my total refund value as a positive number," and our tool instantly creates the right visualization on a live dashboard, so you can focus on insights instead of formulas.

Related Articles