Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power BI Table Percentage: How to Calculate and Display

· 6 min read · Smart Home

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To create a percentage in a Power BI table, the fastest method is to use the "Show value as" feature for simple proportions, or create a DAX measure using the DIVIDE function for complex, dynamic calculations. This allows you to transform raw numbers into relative percentages, making it easier to identify trends, market share, or progress toward a goal within your data visualization.

What You'll Need

  • Power BI Desktop installed and running.
  • A dataset loaded into your model containing at least one numeric column (the value you want to measure) and one categorical column (the dimension you want to group by).
  • Basic familiarity with the Report view and the Visualizations pane.

Step-by-Step

Depending on your needs, there are two primary ways to achieve a percentage. Method one is a "quick win" for static reports, while method two is the professional standard for scalable dashboards. Note that menu labels may differ slightly depending on your version of Power BI Desktop or region.

Method 1: Using the "Show Value As" Shortcut

This method is ideal when you need a quick percentage of a total without writing any code. It is best used for simple tables where you want to see how much each row contributes to the overall sum of the column.

  1. Open your report in the Report view.
  2. Select the Table or Matrix visual from the Visualizations pane and add it to your canvas.
  3. Drag the categorical field (e.g., "Product Category") into the Columns or Rows bucket.
  4. Drag the numeric field (e.g., "Sales Amount") into the Values bucket. Initially, this will show the absolute sum of sales.
  5. In the Values bucket, click the small downward arrow (or right-click) next to the numeric field name.
  6. Hover over Show value as in the context menu.
  7. Select Percent of grand total.
  8. The table will instantly update, replacing the raw numbers with percentages that add up to 100% for the entire table.

Method 2: Creating a DAX Measure (The Professional Way)

The "Show value as" method is limited because you cannot use that percentage in other calculations. To create a flexible percentage that works across different filters and slicers, you must use a Data Analysis Expressions (DAX) measure.

  1. Go to the Home tab on the top ribbon and select New Measure.
  2. In the formula bar that appears, you need to create two parts: the numerator (the specific value) and the denominator (the total value).
  3. Start by defining the numerator. For example: Total Sales = SUM('SalesTable'[SalesAmount]). (If you already have a sum measure, you can skip this).
  4. Create the percentage measure using the following logic: Percentage of Total = DIVIDE([Total Sales], CALCULATE([Total Sales], ALL('SalesTable'))).
  5. Breakdown of this formula:
    • DIVIDE: This function is safer than using a forward slash (/) because it handles "division by zero" errors gracefully by returning a blank instead of an error.
    • CALCULATE: This changes the context of the calculation.
    • ALL('SalesTable'): This tells Power BI to ignore any filters applied to the table, ensuring the denominator is always the grand total of all sales, regardless of which row the percentage is appearing in.
  6. Press Enter to save the measure.
  7. With the new measure selected in the Data pane, go to the Measure tools tab in the top ribbon.
  8. Click the % symbol in the Formatting section to convert the decimal (e.g., 0.15) into a readable percentage (15%).
  9. Drag this new measure into your Table visual alongside the original raw value.

Common Mistakes

One of the most frequent errors is using the / operator instead of the DIVIDE() function. While the slash works for basic math, it will cause your entire visual to crash or display "Infinity" if a filter results in a zero value in the denominator. Always use DIVIDE() for production reports.

Another common mistake is applying the percentage format to the underlying column rather than the measure. If you change a column to a percentage format, Power BI treats every single row as a percentage of 1 (100%), which will result in your table showing 100% for every entry. Formatting must be applied to the calculated measure, not the source data column.

Users also often forget to use the ALL() or ALLEXCEPT() functions in their DAX. If you simply divide a sum by a sum without changing the filter context, Power BI divides the row value by itself, resulting in 100% for every row. You must explicitly tell Power BI to "look at the whole table" for the denominator.

Tips

To make your tables more readable, combine your percentage column with Conditional Formatting. Select your percentage measure in the Visualizations pane, go to the Format visual tab, find Cell elements, and toggle on Background color or Data bars. This allows stakeholders to visually spot the highest percentages without reading every number.

If you have a very large dataset, avoid using ALL() on the entire table if you only need to ignore filters on one specific column. Instead, use ALL('Table'[ColumnName]). This improves performance and ensures that other slicers (like Date or Region) still affect the percentage calculation, which is usually what the end-user expects.

For those using Matrix visuals, you can create percentages that calculate by row or by column specifically. By using ALLSELECTED() instead of ALL(), your percentages will update dynamically as users interact with slicers, ensuring the total always equals 100% of the visible data rather than the entire database.

Troubleshooting

If your percentage is showing as 100% for every row, check your DAX formula. You likely missed the CALCULATE and ALL functions in the denominator. Without these, the measure is calculating the value for that specific row divided by the value for that same row.

If your table is blank or showing errors, check for null values or zeros in your data. While DIVIDE() prevents crashes, it will return a blank if the denominator is zero. Ensure your data source doesn't have empty rows that are skewing the total.

If the percentage doesn't seem to change when you use a slicer, you are likely using ALL(). If you want the percentage to reflect only the filtered data, replace ALL() with ALLSELECTED(). This tells Power BI to respect the filters coming from outside the visual.

If the numbers look like decimals (e.g., 0.1234) instead of percentages (12.3%), you have not set the Data Format. Click the measure in the Data pane, go to the Measure tools tab, and select the % icon. You can also set the number of decimal places in this same menu to clean up the visual.

Frequently Asked Questions

Can I show both the raw value and the percentage in the same table?

Yes. Simply drag the raw numeric field (e.g., Sum of Sales) and your percentage measure into the Values bucket of the table. They will appear as two separate columns side-by-side.

What is the difference between ALL and ALLSELECTED?

ALL ignores all filters on the table, meaning the percentage is based on the entire dataset. ALLSELECTED ignores filters inside the visual but respects filters from slicers, meaning the percentages will always sum to 100% of whatever the user has currently filtered.

How do I calculate a percentage of a different column (not the total)?

Instead of using ALL() in the denominator, simply reference the other measure or column. For example: Profit Margin = DIVIDE([Total Profit], [Total Sales]). This calculates the ratio between two different metrics rather than a part-to-whole relationship.

Why is my percentage column showing as a decimal?

Power BI stores percentages as decimals by default. You must manually change the format to "Percentage" via the Measure tools tab or the Formatting pane to display the percent symbol.

Does this work for the Matrix visual as well as the Table visual?

Yes, these methods work for both. In a Matrix, the Show value as option gives you additional flexibility to choose "Percent of column total" or "Percent of row total," which is not available in a standard flat table.