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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.