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
johndolan2
Resolver I
Resolver I

Sum based on a condition

Hi fumbling and hoping for some help. The examples I have looked at have not helped. ...  In the table below I am trying to sum for the city, based on the component. So NYC total would be 10 and the Tulsa total would be 6. The overall cost of Service # A equals 16. I will be using a slicer to select the city. Service # equals a single product. Components are all part of that single product. 

 

Any help would be very much appreciated.  Thanks, John

 

SERVICE #COSTCOMPONENTCITY
A5Z PARTNYC
A1A PARTTULSA
A5Z ADD ONNYC
A5A ADD ONTULSA
1 ACCEPTED SOLUTION

OHHHHHHH Thank you!!!!!

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@johndolan2 

Can you also share the expected result as you have shared the data?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Absolutley - The result for NYC would be 10. And the result for Tulsa would be 6. I only need to be able to show these on a card. So on my report page if I selected NYC on my city slicer, my card visual for NYC would show the number 10. John

Anonymous
Not applicable

A simple Sum measure should do the needful.

SUM of Cost = SUM(#Cost)

If you use above measure in a card and then try to slice by city or service, you should get the desired result.

OHHHHHHH Thank you!!!!!

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.