Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Apply group header to rows.

Need to fetch the names in blue and apply them to each row in a new column.

Any ideas? 

RAW DATA

Capture.JPG

DESIRED RESULT IN QlikVieW

Capture1.JPG

5 Replies
marcus_sommer

With peek() or previous() you could grab previous rows - see also: Peek() vs Previous() – When to Use Each

and just written down without testing:

Load * where len(Side) >= 1;

Load *, if(len(peek('Side') = 0, peek('BalancePool')) as Name From RawData;

- Marcus

jonathandienst
Partner - Champion III
Partner - Champion III

Looks a good start - you may also need this:

Load * where len(Side) >= 1;

Load *, if(len(peek(Side) = 0, peek(BalancePool), peek(Name)) as Name From RawData;

to populate Name if there is more than one row under one heading.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Looks promising!

Im a bit of a nube, so how would you implement this?

Something like the below?

Also, can you see what might be wrong with the IF-statement?


Directory;
LOAD
BalancePool,
   
Side,
   
[Balance Date],
   
[Available Balance],
   
[Avail Bal DCIP],
   
[Booked Balance]
FROM
testBalances.xls
(
biff, embedded labels, table is [(020)Balance Report$]);

Load * where len(Side) >= 1;
Load *, if(len(peek(Side) = 0, peek(BalancePool), peek(Name)) as Name;

Not applicable
Author

Can you pls give me a QV-file example?

Would make my day!

MayilVahanan

Hi

Try like this

TestBalances:

Load *, if(len(peek('Side')) = 0, peek('BalancePool'), Peek('Name')) as Name;

LOAD BalancePool,

     Side,

     [Balance Date],

     [Available Balance],

     [Avail Bal DCIP],

     [Booked Balance]

FROM

testBalances.xls

(biff, embedded labels, table is [(020)Balance Report$]);

NoConcatenate

LOAD * Resident TestBalances Where IsNum(BalancePool);

DROP Table TestBalances;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.