absolute value
3 TopicsHow to calculate ABS value
Hi, I need ur help that I need to calculate the difference between the number of actual sales and forecast sales, but the positive value and negative value shoudn't be offset, so I need to calculate the absolute difference. And here is my situation, please refer to the link: https://drive.google.com/file/d/1-JcZDiK5D7cm9BwCj4h4g7o_u-g1rnlX/view?usp=sharingSolved708Views0likes1CommentCumulative sum of absolute differences
Hello, The issue : We try to measure the precision of our teams between the budget they target and what they actually spend. So it's important that we use the cumulative of absolute differences (however the delta is negative or positive) I have many line in my dataset because users can filter on many things To simplify what I try to achieve I made this table : Month Budget Actual Relative difference Absolute difference What I try to calculate January 1000 900 100 100 100 February 800 1000 -200 200 300 March 1200 1300 -100 100 400 The table looks like something like (2 last columns make the link with the previous table) : Month Team type Budget Actual tot budget tot Actual January A 1 250 300 1000 900 January A 2 250 200 January B 1 250 150 January B 2 250 300 February A 1 200 100 800 1000 February A 2 200 300 February B 1 200 200 February B 2 200 200 March A 1 300 400 1200 1300 March A 2 300 200 March B 1 300 300 March B 2 300 400 What I tried : var f = CALCULATE(SUM(Actuals_Profiling[Cost]),Actuals_Profiling[cost_type]="Actual") var g = CALCULATE(SUM(Actuals_Profiling[Cost]),Actuals_Profiling[cost_type]="Profiling") var h = ABS(g-f) var i = sumx(SUMMARIZE('Working days', 'Working days'[fmonth], "absolute", h),[absolute]) return i It doesnt work any idea ?Solved1.6KViews0likes4CommentsApply difference to multiple IDs within a group in DAX
I have a table with daily Consumption totals and a fixed Capacity amount per ID. I want the Consumption value to be subtracted from the "first" ID's Capacity until it is 0, and then subtract the remaining amount from the next ID within the group. Desired output is the Amount Left column below: Date Group ID Capacity Consumption Amount Left 1/1/2019 A 1 10 8 2 1/1/2019 A 2 15 8 15 1/1/2019 A 3 15 8 15 1/2/2019 A 1 10 9 0 1/2/2019 A 2 15 9 4 1/2/2019 A 3 15 9 15 1/3/2019 A 1 10 10 0 1/3/2019 A 2 15 10 0 1/3/2019 A 3 15 10 11.7KViews0likes4Comments