Forum Discussion
FGLacorte
4 years agoNew Member
Excel Formula to DAX
Hi all, need assistance how to do this excel formula to DAX. Basically i want to forecast my headcount until year-end by adding the latest actual headcount (is July) on number to hire from August to ...
Anonymous
4 years agoNot applicable
Hi FGLacorte ,
Please new a calculated column:
Forecast =
VAR _month =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER ( 'Table', 'Table'[Actual Headcount] <> BLANK () )
)
VAR _actual_max =
CALCULATE (
MAX ( 'Table'[Actual Headcount] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] = _month )
)
VAR _result =
IF (
'Table'[Actual Headcount] = BLANK (),
SUMX (
FILTER ( 'Table', 'Table'[Date] <= EARLIER ( 'Table'[Date] ) ),
'Table'[To Hire]
) + _actual_max
)
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data