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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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

@Anonymous ,

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

@Anonymous ,

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
Anonymous
Not applicable

Super thanks amit!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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