Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can anyone help me with this? I need to fill the cells(red) in the second column . I have to look at A and when i have a line with * i need to fill all the lines below this with the account written before the star sign. I tried peek function but it doesn't work because i have not a rule...only depends on the star sign. Thank you!
from this:
cost centre | accountf |
36400 | |
36420 | |
61000 | |
70200 | |
* 6021010100 Ch mat auxiliar | 6021010100 |
55555 | |
57777 | |
69969 | |
* 6021010140 Ch mat auxiliar | 6021010140 |
to this:
cost_centre | accountff | |
36400 | 6021010100 | need to fill |
36420 | 6021010100 | need to fill |
61000 | 6021010100 | need to fill |
70200 | 6021010100 | need to fill |
* 6021010100 | 6021010100 | I have this |
55555 | 6021010140 | need to fill |
57777 | 6021010140 | need to fill |
69969 | 6021010140 | need to fill |
* 6021010140 | 6021010140 | I have this |
Like this:
Input:
LOAD RowNo() as ID, cost centre,accountf
Inline
[
cost centre,T_accountf
36400,
36420,
61000,
70200,
* 6021010100 Ch mat auxiliar,6021010100
55555,
57777,
69969,
* 6021010140 Ch mat auxiliar,6021010140
];
Result:
LOAD ID,
cost centre,
if(Len(T_accountf) = 0, Peek(accountf), T_accountf) as accountf
Resident Input
Order by ID Desc;
Drop Table Input;