Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 NumberOrder NumberInvoice Value
1O1210
2O1312
3O1210
4O1510

 

Desired Output Table

Order NumberSum Invoice Value
O1220
O1312
O1510

 

Please help. Much appreciated.

2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@Anonymous 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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

Nathaniel_C
Super User
Super User

Hi @Anonymous ,
Try this

 

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

 

new.PNG

 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Super User
Super User

Hi @Anonymous ,
Try this

 

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

 

new.PNG

 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

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

Hi @Anonymous ,
Glad I could help!
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




parry2k
Super User
Super User

@Anonymous 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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.