Forum Discussion
Jodallen123
Helper I
1 year agoProblem with USERELATIONSHIP together with DATESMTD
Hi, I am trying to create a measure the calculates the running total of a value, if the date is past "today" it should show blank. My current measure shows a correct running total but I can'...
- 1 year ago
Wrap it in an IF, e.g.
ValueRunningTotal = IF ( MIN('Master Time Table'[Date]) <= TODAY(), VAR value= CALCULATE ( SUM ( 'projects'[Value] ), 'projects'[category] = "Xyz123", USERELATIONSHIP ( 'projects'[DoneDate], 'Master Time Table'[Date] ), DATESMTD ( 'Master Time Table'[Date] ) ) RETURN value )
sjoerdvn
Solution Sage
1 year agoWrap it in an IF, e.g.
ValueRunningTotal =
IF ( MIN('Master Time Table'[Date]) <= TODAY(),
VAR value=
CALCULATE (
SUM ( 'projects'[Value] ),
'projects'[category] = "Xyz123",
USERELATIONSHIP ( 'projects'[DoneDate], 'Master Time Table'[Date] ),
DATESMTD ( 'Master Time Table'[Date] )
)
RETURN
value
)- Jodallen1231 year ago
Helper I
Big thanks! I did not know you could wrap the whole thing in an IF-statement like that. I only tried to wrap the revenue-variable itself in an IF-statement without any luck.