Forum Discussion

RSSILVA_22's avatar
RSSILVA_22
Helper I
4 years ago
Solved

calculated column help

I have the following table below:   the field "cod client" is repeated several times in the table. I need a column that shows the largest date, before the current record.   example: "cod d...
  • tamerj1's avatar
    tamerj1
    4 years ago

    Hi RSSILVA_22 
    Here is the sample file withe workable solution https://www.dropbox.com/t/KT0CShGmy8yTXvEc

    Previous Date = 
    VAR CurrentDate = pratic[date_value]
    VAR CurrentClientTable =
        CALCULATETABLE ( pratic, ALLEXCEPT ( pratic, pratic[cod_client] ) )
    RETURN
        MAXX (
            FILTER ( CurrentClientTable, pratic[date_value] < CurrentDate ),
            pratic[date_value]
        )