Forum Discussion

FrancoIVM's avatar
FrancoIVM
New Member
5 years ago
Solved

Use the current row date

Hi, I want to calculate the last price from a column filter by date, but i want that the dates that are being evaluated ends at the current date of the row.   something like: Last price bt = CAL...
  • DataZoe's avatar
    5 years ago

    Hi FrancoIVM , please try this measure:

    Previous Price =
    CALCULATE (
        LASTNONBLANKVALUE (
            'Table'[Dates],
            [Unit Price]
        ),
        FILTER (
            ALLSELECTED ( 'Table'[Dates] ),
            ISONORAFTER (
                    'Table'[Dates], MAX ( 'Table'[Dates] )DESC
            )
        )
    )