ShowValueForDates - gchuanzhang/OA GitHub Wiki
ShowValueForDates
Description
- To determine whether the date of one row is before or after a given date.
- Used in Payroll Projection: if a given payroll date is before today's date, show the actual amount, else show the prediction.
Code
ShowValueForDates =
VAR LastDateWithData = CALCULATE (max( Payroll[pp_to_date] ), REMOVEFILTERS ())
VAR FirstDateVisible = MIN ( 'Payroll Projection'[Date] )
VAR Result = FirstDateVisible <= LastDateWithData
RETURN Result