Forum Discussion
SUM by Project
Hi,
I have the following columns in my model:
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!
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
6 Replies
- as3znausHelper 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!
- itchyeyeballsImpactful Individual
I'd consider making a measure for this rather than a calculated column, would give you more flexibility to slice and filter later on.
- BaskarResident Rockstar
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
- as3znausHelper I
Thanks itchyeyeballs and Baskar!
I got my Coste Consolidado, but now I want to sum my Actual Cost to Origin.
I need "Coste Actual Estimado" to be an accumulated value, something like this:
Coste Mensual Estimado Coste Total 2015 Coste Actual Estimado Month 0 50 50 January 0 50 50 February 0 50 50 March 0 50 50 April 0 50 50 May 0 50 50 June 0 50 50 July 15 50 65 August 10 50 75 September 15 50 90 October 0 50 90 November 35 50 125 December 40 50 165