Forum Discussion

Petenausen's avatar
Petenausen
New Member
9 years ago
Solved

Sum on key values

Hi,

 

I have to make a service level indicator on power bi.

I have a list of orders make by different customers. and I need to sum them to calculate fill rate.

How could i sum them only if the value of a column is the same?

For example

x 5

y 6

x 10

z 12 

y 3

I wanna have

x 15

y 9

z 12 

is it possible? thanks

  • HI Petenausen

     

    I use the following table 

    Order	Value
    x	5
    y	6
    x	10
    z	12
    y	3

    And just dragged both columns to the canvas using a TABLE visual which automatically grouped the [Order] column and SUMed the [Value] column

     

  • Hi Petenausen,

     

    In addition, you can also use the formula below to create a new summarize table in this scenario. :smileyhappy:

     

    Summarize Table = SUMMARIZECOLUMNS(Table1[Order],"Total Value",SUM(Table1[Value]))

     

    Regards

2 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    HI Petenausen

     

    I use the following table 

    Order	Value
    x	5
    y	6
    x	10
    z	12
    y	3

    And just dragged both columns to the canvas using a TABLE visual which automatically grouped the [Order] column and SUMed the [Value] column

     

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi Petenausen,

     

    In addition, you can also use the formula below to create a new summarize table in this scenario. :smileyhappy:

     

    Summarize Table = SUMMARIZECOLUMNS(Table1[Order],"Total Value",SUM(Table1[Value]))

     

    Regards