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 August 31st. Request your voucher.

Reply
calvgo
Helper I
Helper I

DAX Calculate the sum of cost divide by count of cost

I have a question of calculating the total cost of each work order divided by the count of cost. There are duplicates in the total cost for each work order and the count is used to get the actual cost. See example below, where sometimes the cost is duplicated three or two times etc.  

 

I used Quoted Cost = DIVIDE([Planned Cost],[Count of Planned Cost]). Each line looks okay, but when you look at the aggregated quoted cost, the quoted cost is wrong as it uses 621084/ 415 = 1497. I need the aggregate of quoted cost by summing up each line of the quoted cost. 
 
Appreciate any help.

 

 

calvgo_1-1600417085468.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@calvgo ,

sumx( values(Table[Work Order]),Quoted Cost = DIVIDE([Planned Cost],[Count of Planned Cost]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@calvgo ,

sumx( values(Table[Work Order]),Quoted Cost = DIVIDE([Planned Cost],[Count of Planned Cost]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Super thanks amit!!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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