Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
markp201
Contributor III

Peek function - field not found...

customersalesmanmatch

what is needed

(run_sum)

AS111
AS112
AS200
AS311
AS312
BS100
BS411
BS412
BS311
BS312

if(Previous(customer&salesman)=customer&salesname,rangesum(peek(run_sum,-1),match),match) as run_sum

We're getting field not found <match>

This is a resident load from a table with customer,salesman, match

Tags (3)
1 Solution

Accepted Solutions
Highlighted

Re: Peek function - field not found...

Seems to be working

Table:

LOAD * INLINE [

    customer, salesman, match,

    A, S1, 1

    A, S1, 1

    A, S2, 0

    A, S3, 1

    A, S3, 1

    B, S1, 0

    B, S4, 1

    B, S4, 1

    B, S3, 1

    B, S3, 1

];

FinalTable:

LOAD *,

  if(Previous(customer&salesman)=customer&salesman,rangesum(peek(run_sum,-1),match),match) as run_sum

Resident Table

Order By customer, salesman;

DROP Table Table;

View solution in original post

2 Replies
Highlighted

Re: Peek function - field not found...

Seems to be working

Table:

LOAD * INLINE [

    customer, salesman, match,

    A, S1, 1

    A, S1, 1

    A, S2, 0

    A, S3, 1

    A, S3, 1

    B, S1, 0

    B, S4, 1

    B, S4, 1

    B, S3, 1

    B, S3, 1

];

FinalTable:

LOAD *,

  if(Previous(customer&salesman)=customer&salesman,rangesum(peek(run_sum,-1),match),match) as run_sum

Resident Table

Order By customer, salesman;

DROP Table Table;

View solution in original post

Highlighted
markp201
Contributor III

Re: Peek function - field not found...

Oh merde - it was typo.  Yes, it works now.