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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Edward_Luo
New Member

Sum of Value of each group

Hello,

 

I am new to PowerBI and want to ask for help regarding the following questios.

 

I have two tables, one is for the specific 'items', the other is for the 'orders'. The relationship is that each order will contain several items. I have generated a new column in the 'items' table to calculate the revenue. Now I wanna calculate the revenue of each order by grouping the corresponding items.

 

Hopefully someone can give me hints on the DAX fuction. Thank you so much in advance!

 

Best regards,

Edward

 

Edward_Luo_0-1647234947835.png

Edward_Luo_1-1647235001739.png

 

 

 

1 ACCEPTED SOLUTION
Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @Edward_Luo 
you can use
Order_revenue =
SUMX( 
         RELATEDTABLE( 'Items Table'),
         'Items Table'[Item_revenue]
)
provided that the items table and orders table are related in the data model by the Order_id.

Regards,
Aditya

View solution in original post

2 REPLIES 2
Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @Edward_Luo 
you can use
Order_revenue =
SUMX( 
         RELATEDTABLE( 'Items Table'),
         'Items Table'[Item_revenue]
)
provided that the items table and orders table are related in the data model by the Order_id.

Regards,
Aditya

Hey Aditya,

 

Thank you so much for your quick responce! It perfectly solve me problem!

 

Best regards,

Edward

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.