Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello folks need help, I am trying to use peek function or previous function, but not getting desired result.
I need NEW_ORGANIZATION field repeated with last occurrence of ORGANIZATION until there is change in value.
Can someone please give me hint.
STATUS | REFERENCEDATE | WORKITEMID | ORGANIZATION | NEW_ORGANIATION |
Maintenance | 1/10/2018 | 2070400 | A1 | A1 |
Maintenance | 1/11/2018 | 2070400 | A1 | |
Maintenance | 1/12/2018 | 2070400 | A1 | |
Maintenance | 1/13/2018 | 2070400 | A2 | A2 |
Maintenance | 1/14/2018 | 2070400 | A2 | |
Maintenance | 1/15/2018 | 2070400 | A2 | |
Maintenance | 1/16/2018 | 2070400 | A2 |
This should work:
If(Len(ORGANIZATION)=0,Peek(NEW_ORGANIZATION),ORGANIZATION) as NEW_ORGANIZATION
Resident Table
This should work:
If(Len(ORGANIZATION)=0,Peek(NEW_ORGANIZATION),ORGANIZATION) as NEW_ORGANIZATION
Resident Table
Thanks David ! Let me try
David, I tried with one field, seems like it is working. I f I have another attribute, it does not work. Do I have to do something differently? For example if I want this logic for NEW_ORGANIZATION and NEW)GROUP as well?
STATUS | REFERENCEDATE | WORKITEMID | ORGANIZATION | NEW_ORGANIATION | Group | New_GROUP |
Maintenance | 1/10/2018 | 2070400 | A1 | A1 | G1 | G1 |
Maintenance | 1/11/2018 | 2070400 | A1 | G1 | ||
Maintenance | 1/12/2018 | 2070400 | A1 | G1 | ||
Maintenance | 1/13/2018 | 2070400 | A2 | A2 | G2 | G2 |
Maintenance | 1/14/2018 | 2070400 | A2 | G2 | ||
Maintenance | 1/15/2018 | 2070400 | A2 | G2 | ||
Maintenance | 1/16/2018 | 2070400 | A2 | G2 | ||
|
The logic stays the same, just change the names of the fields