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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
acnt_schartner
Helper III
Helper III

Combine Costs of Project and Subproject

Hello,

 

i have the following table:

Project_NumberCosts
100001250000
100002230000
100002235000

 

The 6 digit Project_Numbers are our usual projects. There are subprojects that just get an extra added number to the Project_Number (7 digits). We invoice a total amount for project and subproject and i want to compare the costs to the earnings (the subproject dont have earnings and the main-project has the earnings of both). Is there a way to create a column that sums the cost of the project and the subprojects like this?

 

Project_NumberCostsSUM_Costs
100001200000200000
100002180000215000
1000022350000

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@acnt_schartner 

please try this

Column = 
if(LEN('table'[Project_Number])=7,0,SUMX(FILTER('table',left('table'[Project_Number],6)=LEFT(EARLIER('table'[Project_Number]),6)),'table'[Costs]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @acnt_schartner ,

 

 

Split your project number and sub number in Power Query.

 

1.jpg

 

 

You can then create a measure

 

Measure_ ProjectSUM = SUM('Table'[Costs])

 

2.JPG

 

 

Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

ryan_mayu
Super User
Super User

@acnt_schartner 

please try this

Column = 
if(LEN('table'[Project_Number])=7,0,SUMX(FILTER('table',left('table'[Project_Number],6)=LEFT(EARLIER('table'[Project_Number]),6)),'table'[Costs]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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