cancel
Showing results for
Did you mean:
Highlighted
New Member

## Calculate Table and add row as a sum of values

Hi there,

I am relatively new, therefor a more basic question. But i just can't figure the solution.

I would like to calculated a table including a sum of one of the columns. The calculated row is summing up the values based on a certain characteristica. (I don't want to create a matrix visual)

The table are invoices with references to orders. I need to know the sum of order value

Original Table

 Invoice Number Order Number Invoice Value 1 O12 10 2 O13 12 3 O12 10 4 O15 10

Desired Output Table

 Order Number Sum Invoice Value O12 20 O13 12 O15 10

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User IV

@beatbrun use a  table visual,

add order number and Invoice Value and it will give you the sum of invoice value assuming it is a number field.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Highlighted
Super User I
Hi @beatbrun ,
Try this

``myTableToo = SUMMARIZECOLUMNS('Table'[Order Number],"Sum Invoice Number",SUMX('Table','Table'[Invoice Value]))``

Go to the Modeling tab, select New Table and add code.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

Proud to be a Super User!

4 REPLIES 4
Highlighted
Super User IV

@beatbrun use a  table visual,

add order number and Invoice Value and it will give you the sum of invoice value assuming it is a number field.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Highlighted
Super User I
Hi @beatbrun ,
Try this

``myTableToo = SUMMARIZECOLUMNS('Table'[Order Number],"Sum Invoice Number",SUMX('Table','Table'[Invoice Value]))``

Go to the Modeling tab, select New Table and add code.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

Proud to be a Super User!

Highlighted
New Member

PERFECT! This is it! You made my day! 😄 @Nathaniel_C

Highlighted
Super User I

Hi @beatbrun ,
Nathaniel

Proud to be a Super User!

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors