Forum Discussion
Lyssillic
6 years agoHelper I
Recursive DAX Calculated Column
My company needs a scheduling report for the hours worked on machines. We can only use DirectQuery, not import due to security reasons. What I have so far is a table that has the HoursRemaining (t...
amitchandak
6 years agoSuper User
This how I provided the last two measure on initial data
Diff = CALCULATE(sum(Sheet1[HoursPlanned])-sum(Sheet1[HoursRemaining]),FILTER('Date','Date'[Date]<=MAX('Date'[Date])))
//last two measure in you table
over cap cal = IF([Diff]<0,[Diff]*-1,0)
Over under cap = if([Diff]>0,[Diff],0)
Lyssillic
6 years agoHelper I
amitchandak I know, that's just giving me the same data that I started with. It's not recursively adding up the hours over capacity and subtracting the hours under capacity.