Forum Discussion

danielhough's avatar
danielhough
Helper II
3 years ago
Solved

Carry Forward Values until Change

Hello everyone! I have a issue below that I am trying to resolve. I have daily rates in the below table. The rate for July, 1.14043 remains constant throught its next change on August 1, 1.55169. I n...
  • PaulDBrown's avatar
    PaulDBrown
    3 years ago

    The method I posted was using measures.

    If you want it as a calculated column, use:

    Filled Value =
    VAR _LNB =
        CALCULATE (
            MAX ( 'Table'[Date] ),
            FILTER (
                'Table',
                'Table'[Date] <= EARLIER ( 'Table'[Date] )
                    && NOT ISBLANK ( 'Table'[Daily Rate] )
            )
        )
    RETURN
        LOOKUPVALUE ( 'Table'[Daily Rate], 'Table'[Date], _LNB )