Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RutiTaumanRubin
Creator
Creator

Last value

Hi everyone,

I have table with the following fields: ID, P_Year , P_Status

I want to create also calculate field named: 'P_Last_Status' that display the status of last year for each ID:

IDP_YearP_StatusP_Last_Status
112015Success
112016FailureSuccess
112017GoodFailure
222015Success
222016GoodSuccess
222017SuccessGood

I also want to display by default only the record of max year (in this example only the records of 2017) unless the user choose value in field P_Year then the table will filter according to the selection..

I try to calculate the field P_Last_Status with function above() but it's not working because the filer..

Could you please advise how can I do it?

Thank you..

4 Replies
RutiTaumanRubin
Creator
Creator
Author

Hi,

Thank you for your response..

The problem is that I need to add filter to the table, Year = Max(Year) , so only the records of 2017 will remain:

IDP_YearP_StatusP_Last_Status
112017GoodFailure
222017SuccessGood

In your solution when I added the filter I got no value in field P_Last_Status..

Could you please advise?

Thank's

bramkn
Partner - Specialist
Partner - Specialist

If P_Status is a field. add another field with the last status in the dataset.

menta
Partner - Creator II
Partner - Creator II

use peek or previous or above

if(ID=peek(ID),Peek(P_Status),'')