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

Find the distinct project sum of budget

I am looking to find the sum of the budget of disticnt project .  Really appreciate if someone can help me on this

 

Project namestatusbudgetdatesk
Project Adev650020200528
Project Bin progress500020200528
Project CQA550020200528
Project Acompleted650020200529
Project BUnit testing500020200529
Project CComplted 550020200529

 

expected result : 

Budget of project17000 (6500+5000+5500)
1 ACCEPTED SOLUTION
stevedep
Memorable Member
Memorable Member

Hi,

 

Here is the solution for you:

sumdistinct = 
var tbl = SUMMARIZE('Table';'Table'[Name];'Table'[Project];'Table'[Budget])
return
SUMx(tbl;'Table'[Budget])

As can be seen here:

sumdistinct.png 

Power BI file is available here

 

Please mark as solution if this is what you are looking for. Thanks!

 

Kind regards,

 

Steve. 

View solution in original post

7 REPLIES 7
stevedep
Memorable Member
Memorable Member

Hi,

 

Here is the solution for you:

sumdistinct = 
var tbl = SUMMARIZE('Table';'Table'[Name];'Table'[Project];'Table'[Budget])
return
SUMx(tbl;'Table'[Budget])

As can be seen here:

sumdistinct.png 

Power BI file is available here

 

Please mark as solution if this is what you are looking for. Thanks!

 

Kind regards,

 

Steve. 

Anonymous
Not applicable

@stevedep  thanks you so much Steve. Its working fine. 

 

 

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

You can try these measures.

 

1.jpg

 

 

BudgetT = MAX('Table'[budget])
 
Project Budget = SUMx(DISTINCT('Table'[Project name]),[BudgetT])
 
 
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous
Not applicable

@harshnathani  thank you Harsh for you time. Really appreciate it. Sorry for not provideing more details on the requirement. 

Anonymous
Not applicable

Hi @harshnathani 

when i create this measure BudgetT = MAX('Table'[budget]) getting an error "The MAX funtion only accept a column reference as the argument number 1". 

 

Then i tried to change it by BudgetT = MAX('Table'[budget],1) , this measure error got fixed but the final measure getting as below

 

project budget: 6500212

 

Could you please help me 

Hi @Anonymous ,

 

Can you share your .pbix file removing all sensitive data ?

 

Regards.

HN

Hi @Anonymous ,

 

Is budget a column in your table or a measure ?

 

 

 

Regards,

HN

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