how do i add a kpi

Kenneth Borruso 0 Reputation points
2026-11-12T16:02:58.55+00:00

I have a power BI I am building a KPI I need to know how to sum the sum of all values of a field like total sales where each order has a total sales. I need total sales of total sales.

Microsoft 365 and Office | Excel | For business | Other
0 comments No comments

2 answers

Sort by: Newest
  1. Chris-D 2,625 Reputation points Independent Advisor
    2026-11-12T16:16:23.96+00:00

    Hi Kenneth,

    Thank you for sharing your concern.

    If each order appears only once in your table and the Total Sales field contains the sales amount for that order, you can create the following DAX measure:

    Total Sales KPI = SUM('TableName'[Total Sales])
    

    Replace TableName with the actual name of your table. You can then add this measure to a Card visual or use it as the Indicator value in your KPI visual.

    However, if the same order appears across multiple rows and its Total Sales value is repeated on each row, using SUM() directly may count the same order more than once. In that case, you can create a measure similar to the following:

    Total Sales KPI =
    SUMX(
     VALUES('TableName'[Order ID]),
     CALCULATE(MAX('TableName'[Total Sales]))
    )
    

    This measure calculates the Total Sales value once for each unique Order ID.

    For detailed guidance, you may find these articles helpful:

    In case you require more in-depth guidance or support with these steps, I’d recommend posting your query in the Microsoft Fabric Community – Power BI forums. This is a dedicated channel for Power BI discussions. The reason I suggest posting a new topic there is that resources and expertise on Power BI are limited in the general Q&A forum. In the Microsoft Fabric Community, you’ll find the most qualified group of respondents, and other partners who regularly read the forums can share their knowledge or learn from your interaction.

    User's image

    I hope this information is helpful. Should you have any further questions or need additional assistance, please feel free to share them in the comments below. I will be happy to help.  


    If the answer is helpful, please click "Yes" and kindly upvote it.

    Note: Follow the steps in the forum documentation to enable email notifications if you want to receive email notifications related to this topic.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-11-12T16:04:56.5533333+00:00

    Create a Total Sales measure that sums the order-total column, and then use that measure as the KPI’s indicator.

    1. Create the Total Sales measure

    In Power BI Desktop:

    1. In the Data or Report view, right-click your sales table in the Fields/Data pane.
    2. Select New measure.
    3. Enter this formula, replacing the table and column names with yours:
    Total Sales =
    SUM ( Sales[Order Total] )
    

    SUM adds every numeric value in the specified column.^1^ Measures also recalculate according to the report’s filters and slicers.^2^

    This is correct when each row represents one order, for example:

    Order ID Order Total
    1001 100
    1002 250
    1003 75

    The measure returns 425.

    If an order appears on multiple rows

    If the same complete order total is repeated on every product line, a direct SUM would count that order more than once. Sum one value per order instead:

    Total Sales =
    SUMX (
        VALUES ( Sales[Order ID] ),
        CALCULATE ( MAX ( Sales[Order Total] ) )
    )
    

    This creates a distinct list of order IDs, takes one order-total value for each order, and adds those values. SUMX evaluates an expression for every row of a table and then returns the sum.^3^

    Do not use that pattern if Order Total is actually the value of each individual product line. For line-level data, use:

    Total Sales =
    SUM ( Sales[Line Total] )
    

    If line total must be calculated from quantity and price, use:

    Total Sales =
    SUMX (
        Sales,
        Sales[Quantity] * Sales[Unit Price]
    )
    

    2. Add it to a visual

    For a simple number without a goal:

    1. Select the Card visual.
    2. Drag the new Total Sales measure into the card.
    3. In Format visual, set the currency, decimal places, and display units.

    For a KPI that compares sales with a target:

    1. Add Total Sales to a temporary chart as the value.
    2. Add a date field, such as Calendar[Month], as the trend axis.
    3. Sort the date axis in ascending chronological order before converting the chart; KPI visuals do not provide a sorting option after conversion.
    4. Select the KPI icon in the Visualizations pane.
    5. Assign:
      • Indicator/Value: Total Sales
      • Trend axis: your date or month field
      • Target: a sales-target measure or field
    6. Open Format visual to configure currency, target label, icons, and whether higher values are better.^4^

    A KPI is intended to evaluate a measure against a defined target. If no target or trend is available, a Card is usually the appropriate visual for displaying total sales.


    References

    1. SUM
    2. DAX overview
    3. SUMX
    4. Create key performance indicator (KPI) visualizations
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.