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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.