Forum Discussion
RSSILVA_22
4 years agoHelper I
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...
- 4 years ago
Hi RSSILVA_22
Here is the sample file withe workable solution https://www.dropbox.com/t/KT0CShGmy8yTXvEcPrevious 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] )
tamerj1
4 years agoCommunity Champion
Hi RSSILVA_22
you can try
Previous Date =
VAR CurrentDate = Table1[date_value]
VAR CurrentClientTable =
CALCULATETABLE ( Table1, ALLEXCEPT ( Table1, Table1[code_client] ) )
RETURN
MAXX (
FILTER ( Table1, Table1[date_value] < CurrentDate ),
Table1[CurrentDate]
)- RSSILVA_224 years agoHelper I
did not work. He made the date -1 The expected was to bring the date of the previous registration.
- tamerj14 years agoCommunity Champion
Hi RSSILVA_22
Here is the sample file withe workable solution https://www.dropbox.com/t/KT0CShGmy8yTXvEcPrevious 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] )- rodrigo090620154 years agoFrequent Visitor
Hi tamerj1,
Thanks for your help.
Thank you for taking the time to review and respond.
It's good to have this community and people like you willing to help.