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
gmark
New Member

Need help summing values of products with same name but different amount

I have been trying to figure out how to sum the values of a product across multiple lines. I have tried many different forums with similar requests, but I can't seem to get the correct answer. Could possibly be my relationships, but I'm unsure. Any help is greatly appreciated! 

 

This first image is my current formula. The answer I'm getting is the total quantity requested for the individual products. I want it to sum the quantity requested in relation to the Product: Product Name and the SSP Name

gmark_0-1634153725224.png

This image is showing the quantity requested for this person. The answer I should be getting in the first image is 204 for Shock Sensor 2 for Aaron Shaw, but I continue to get 86,092. That is the sum of all the requested Shock 2 Sensors and I'm out of formulas and attempts and approaches.

gmark_1-1634153895029.png

 

 

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Based on your description, grouping only needs to be nested in a ALLEXCEPT function. Please try:

Total Requested=
CALCULATE(SUM('MTD Purchase Report-ALL'[Quantity Requested]), ALLEXCEPT( 'MTD Purchase Report- ALL', 'MTD Purchase Report-ALL'[SSP Name],'MTDPurchase Report-ALL'[Product:Product Name]))

 

I tried this a few times thinking I was doing something wrong, but it won't work for me for some reason. It still returns the total requested for each product.

Could you provide sample data or a sample pbix after removing sensitive data?

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

xander2121
Frequent Visitor

Hello @gmark ,

 

Have you tried "Group By" in the "Transform" tab. If you go for advanced group by, you can by name and product and perform aggregations.

 

 

Hello xander2121, I did try that but I don't want it to eliminate those columns. When I did that it grouped the columns and I need it to group rows.

smpa01
Super User
Super User

@gmark  https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M6071...

 

Questions with sample data moves really first in this forum

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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.