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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
as3znaus
Helper I
Helper I

SUM by Project

Hi,

 

I have the following columns in my model:

SUM by Project.JPG

 

I'd like the column "Coste Consolidado" to sum all values in "Coste Mensual Estimado" BY PROJECT ( "Código"). 

As you can see, at the moment I am getting the sum of all projects.

 

¿any idea?

 

Thanks!

 

 

 

1 ACCEPTED SOLUTION

Cool ,

 

Coste Consolidado = var Project =  Estimados[Código]

var Result = calculate ( sum ( Estimados[Coste Mensual Estimado ])
  , filter (all(Estimados) , Estimados[Código]=Project ) )

 

Return Result

 

 

Try this one as a Cal Column 

 

 

View solution in original post

6 REPLIES 6
as3znaus
Helper I
Helper I

I think I've solved it using "Group By" in Edit Queries...but still, if someone knows a better option I would like to hear it!

 

 

Cool ,

 

Coste Consolidado = var Project =  Estimados[Código]

var Result = calculate ( sum ( Estimados[Coste Mensual Estimado ])
  , filter (all(Estimados) , Estimados[Código]=Project ) )

 

Return Result

 

 

Try this one as a Cal Column 

 

 

Thanks @itchyeyeballs and @Baskar!

 

I got my Coste Consolidado, but now I want to sum my Actual Cost to Origin.

 

Coste Origen.JPG

 

I need "Coste Actual Estimado" to be an accumulated value, something like this:

 

 Coste Mensual EstimadoCoste Total 2015Coste Actual Estimado
Month05050
January05050
February05050
March05050
April05050
May05050
June05050
July155065
August105075
September155090
October 05090
November 3550125
December4050165

Create one Measure 

 

Coste Actual Estimado

 = sum( Coste Mensual Estimado) + sum(Coste Total 2015)

 

 

 

 

@Baskar

 

Thanks but it doesn't work for me, I think this formula gives you the sum per month and what I need is the accumulate.

 

The value should always grow, cause it is the sum of all previous months.

 

 

I'd consider making a measure for this rather than a calculated column, would give you more flexibility to slice and filter later on.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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