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
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]))

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]))

Super thanks amit!!

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.

Top Solution Authors