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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Show sum of a group on tabel base

Hi I hope I can explain well what I am trying to achieve.
I have 3 tables which I am trying to link together.

In the Salesline I have many lines with the same Item and sold Quantity.

In The Warehouse i also have many lines with the Same Item and the stored Quantity. 

TobiasMayer_2-1666297880892.png

(Red colums are not availabel in the datasource at the Moment.)

I would need the sum of theses two Quantitys and subtract them from Each other. 

I want to show the individual saleslines from my sales filterd by Item.
At the end of the tables I want to see how many parts are left in my stock.
So in my target table for the same ItemID in each line should be the same value.

TobiasMayer_3-1666297898579.png

 

I tried it with verious measures or adding the grouped Sum in the datasource but could not find a way to make it work.

I hope its understandable. 

Thank you for your help!

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 
I guess the number should be 50 i.e. (10 + 40) not 30

Please try the following measures

Quantity Sum =
CALCULATE (
    SUM ( Salesline[Quantity] ),
    REMOVEFILTERS (),
    VALUES ( Sales[Item] )
)
Warehouse Sum =
CALCULATE (
    SUM ( Warehouse[Warehouse] ),
    REMOVEFILTERS (),
    VALUES ( Sales[Item] )
)

 

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Anonymous 
I guess the number should be 50 i.e. (10 + 40) not 30

Please try the following measures

Quantity Sum =
CALCULATE (
    SUM ( Salesline[Quantity] ),
    REMOVEFILTERS (),
    VALUES ( Sales[Item] )
)
Warehouse Sum =
CALCULATE (
    SUM ( Warehouse[Warehouse] ),
    REMOVEFILTERS (),
    VALUES ( Sales[Item] )
)

 

Anonymous
Not applicable

Hi @tamerj1

yes of cause i meant that.

Thank you very much that was the perfect soulution!!

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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