Forum Discussion
harshad_barge
6 years agoHelper I
Help Please Incorrect DAX code
Hi all, I am trying to edit an incorrect DAX code which is pulling out values as per this table: The expected values as as per the Expected Excel column. Employee Name AUD Total Daily Earn...
az38
6 years agoCommunity Champion
try like a measure
Measure =
var _nextRow = CALCLATE(min('Ordinary Hours'[Calculation Date]), ALLEXCEPT('Ordinary Hours', 'Ordinary Hours'[Employee Name], 'Ordinary Hours'[Payroll Day ID]) )
RETURN
IF (SELECTEDVALUE('Ordinary Hours'[Applicable Payroll Date]) >= SELECTEDVALUE('Ordinary Hours'[Calculation Date]),
0,
CALCULATE(SUM('Ordinary Hours'[AUD Total Daily Earnings]), ALLEXCEPT('Ordinary Hours', 'Ordinary Hours'[Employee Name], 'Ordinary Hours'[Payroll Day ID]), 'Ordinary Hours'[Calculation Date]=_nextRow)
)