Forum Discussion
cruzp
1 year agoHelper V
IF ELSE Time Calculated Measure
Hello, i have a calculated measure below in this table. Is there a way to update the measure below that uses DAX like VAR that cuts by half the actuals on the current month we are in to future mo...
Anonymous
1 year agoNot applicable
Hi cruzp ,
I also create a table and show the matrix as you mentioned.
Next I create a measure and here is the DAX code.
Measure =
VAR _CurrentMonth =
MONTH ( TODAY () )
VAR _CurrentYear =
YEAR ( TODAY () )
VAR _CurrentDate =
TODAY ()
VAR _EmployeeID =
SELECTEDVALUE ( 'Table'[Name] )
RETURN
SUMX (
FILTER ( 'Table', 'Table'[Name] = _EmployeeID ),
IF (
'Table'[Date] >= DATE ( _CurrentYear, _CurrentMonth, 1 ),
'Table'[Total] / 2,
'Table'[Total]
)
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.