Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
mironanca
Contributor
Contributor

Qlik Sense fill cells from the bottom to the top

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 centreaccountf
36400 
36420 
61000 
70200 
*  6021010100  Ch mat auxiliar6021010100
55555 
57777 
69969 
*  6021010140  Ch mat auxiliar6021010140

 

to this:

cost_centreaccountff 
364006021010100need to fill
364206021010100need to fill
610006021010100need to fill
702006021010100need to fill
*  6021010100  6021010100I have this
555556021010140need to fill
577776021010140need to fill
699696021010140need to fill
*  6021010140 6021010140I have this
1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

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;
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein