Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I made a Temp Table resident on my main table which looks like this:
TempOrders:
LOAD unit,
field1,
max(orderID) as [Max order],
timestamp(max(date("OrderDate",'YYYY-MM-DD hh:mm:ss.fff'))) as [Max order date],
Check,
Center,
Year,
Code
resident Orders
where Product='This'
group by unit,field1,orderID,OrderDate,Check,Center,Year,Code;
But i just want the group by to be by unit,OrderDate and orderID.
My problem is, Qlik (or something most probably that i dont do right) won't let me group by just by what i need but needs every other field, or else it shows the error "Invalid Expression" .
For my case the above for Product='This' gives me two dates because of there being two different Check types.
Help? 😬
If you want to just Group by unit.... (why group by the fields which you are aggregating?)... may be try this
TempOrders:
LOAD unit,
Max(orderID) as [Max order],
TimeStamp(Max("OrderDate")) as [Max order date]
Resident Orders
Where Product = 'This'
Group By unit;
If you want to just Group by unit.... (why group by the fields which you are aggregating?)... may be try this
TempOrders:
LOAD unit,
Max(orderID) as [Max order],
TimeStamp(Max("OrderDate")) as [Max order date]
Resident Orders
Where Product = 'This'
Group By unit;