March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 "TaskBaselineDuration" of BaselineNumber = 0 for BaselineNumber = 1 (they have the same TaskId). Basically i want to know the difference between Baseline 1 and Baseline 0 if it has Baseline.
Desired Result is: TaskBaselineDuration for IDs highlighting: (2064-4529)=-2465 or (1855-8)= 1847
i read many similar posts but couldn't find solution. Thanks
Solved! Go to Solution.
@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]
Proud to be a Super User!
Hi @Anonymous ,
First of all, pay attention to your yellow mark is wrong. According to your description, you want to get the value of 1,0 corresponding to TaskBaselineDuration column corresponding to row subtraction under the same TaskID column. I did the following test to create the Subtract_ Result measure: if the ID is the same and the BaselineNumber is 1,0, then the corresponding rows in the TaskBaselineDuration column will be subtracted, otherwise the value will not change.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@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]
Proud to be a Super User!
Thank you so much. Your instructions are awesome and work for my case.
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:
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |