Forum Discussion
dodiyal
3 years agoFrequent Visitor
Subtracting values in same column until the value becomes 0
Hello Team, I have 2 datasets where the- -first dataset is for customer grop,week number and no.of lines being delivered to customer. -Second dataset is only customer group Now i wish to do...
- 3 years ago
dodiyal I did it this way. PBIX is attached below signature.
Burndown = VAR __Week = MAX('Data 1'[week number graph]) VAR __Customers = DISTINCT(SELECTCOLUMNS('Data 2',"__Customer",[Customer Group])) VAR __Table = FILTER(ALL('Data 1'),'Data 1'[Customer Group] IN __Customers && [week number graph] <= __Week) VAR __Total = SUMX(FILTER(ALL('Data 1'),'Data 1'[Customer Group] IN __Customers),[No. of Lines]) VAR __SoFar = SUMX(__Table,[No. of Lines]) VAR __Result = MAX(__Total - __SoFar, 0) RETURN __Result
Ashish_Mathur
3 years agoSuper User
Hi,
Would it be possible to show the expected result in another column of Table1?