Forum Discussion
Anonymous
5 years agoNot applicable
Subtract Between Rows with Same ID
Hi Team, I want to subtract rows with the same Id. Example is what i'm highlighting. Some TaskIDs are unique, some don't. Unique TaskID: We don't do anything. NOT Unique TaskId, i want to subtract...
- 5 years ago
Anonymous
Not sure if one ID will have only one baseline 1 or 0. if so ,you can try to create a new column.
Column = MAXX(FILTER('Table1',Table1[Task ID]=EARLIER(Table1[Task ID])&&Table1[baseline]=0),Table1[TaskBaselineDuration])-Table1[TaskBaselineDuration]
StefanoGrimaldi
5 years agoResident Rockstar
I assume you want to subtract the values of ID that appear more tham once? from the total value of the column? lets say total value column minus those 4 highlighted values? or minus only those that have a value of 1 in baseline?
if its the second case this simply measure will do:
Measure = SUM('Table'[value])-CALCULATE(SUM('Table'[value]),'Table'[baseline]<>"0") this should actually work for both cases. (my example measure have baseline as text, if its a number delete the "")