Forum Discussion

Jodallen123's avatar
Jodallen123
Icon for Helper I rankHelper I
1 year ago
Solved

Problem 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'...
  • sjoerdvn's avatar
    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
    )