Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Aggregate function invalid

I've been getting "invalid expression" errors on all my aggregation functions in a qlikview document and can't figure out why. Here are a couple examples that are not working. I can't seem to figure out where the synatx is wrong

t_AggregateReciept:

LOAD

    PO_line_key,

    sum(num(FreightCharges)) as FreightCharges

Resident t_Reciept

Group By PO_line_key;

left join(OpenOrder)

LOAD

  OrderLineKey,

  POnumber,

  POLineDueDate,

  max(POnumber) as test

Resident POLink

group by OrderLineKey;

EDIT:

Thanks for the solution. All fields must be grouped by or aggregated upon

Message was edited by: Cameron Scully

1 Solution

Accepted Solutions

Re: Aggregate function invalid

t_AggregateReciept:

LOAD

    PO_line_key,

    sum(num(FreightCharges)) as FreightCharges

Resident t_Reciept

Group By PO_line_key;

left join(OpenOrder)

LOAD

  OrderLineKey,

  POnumber,

  POLineDueDate,

  max(POnumber) as test

Resident POLink

group by OrderLineKey,POnumber,POLineDueDate;

1 Reply

Re: Aggregate function invalid

t_AggregateReciept:

LOAD

    PO_line_key,

    sum(num(FreightCharges)) as FreightCharges

Resident t_Reciept

Group By PO_line_key;

left join(OpenOrder)

LOAD

  OrderLineKey,

  POnumber,

  POLineDueDate,

  max(POnumber) as test

Resident POLink

group by OrderLineKey,POnumber,POLineDueDate;

Community Browser