Forum Discussion

NILU090's avatar
NILU090
Icon for Helper II rankHelper II
3 years ago

latest non blank values

Hi Team,Please find the datamodel and output that i require.
I want show difference between current value and last non blank value.

I tried NONBLANKVALUE, howeve its not working. 

please help me on this.

 

 

1 Reply

  • Try

    Diff with previous =
    VAR CurrentDate =
        MAX ( 'Date'[Date] )
    VAR CurrentValue =
        SELECTEDVALUE ( 'Fact'[Value] )
    VAR PrevValue =
        CALCULATE (
            LASTNONBLANKVALUE ( 'Fact'[Date], 'Fact'[Value] ),
            'Date'[Date] < CurrentDate
        )
    RETURN
        CurrentValue - PrevValue