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: 
Anonymous
Not applicable

POS Data with grouping in Qlikview

Hi all,

I would like to group the value of the Table 1 base on Type to Table 2.

or

is it possible to modify from table 1 to table 3?

Anyway to do it in loading script?

Table 1

ReceiptCodeLineNoTypeValue
10011A10
10012extra cost1
10013extra cost3
10014B12
10021A10
10022B12
10031C20
10032extra cost0
10041B12
10042extra cost2
10043C20
10044extra cost2

Table 2

ReceiptCodeLineNoTypeValue
10011A14
10014B12
10021A10
10022B12
10031C20
10041B12
10043C22

Table 3

ReceiptCodeLineNoTypeValue
10011A10
10012A1
10013A3
10014B12
10021A10
10022B12
10031C20
10032C0
10041B12
10042B2
10043C20
10044C2

Best Regards,

Louis

10 Replies
antoniotiman
Master III
Master III

Hi Louis

Temp:
LOAD ReceiptCode,
LineNo,
If(Type='extra cost',Peek(Type),Type) as Type,
Value
FROM
"https://community.qlik.com/message/1302513"
(html, codepage is 1252, embedded labels, table is @1);
NoConcatenate
LOAD ReceiptCode,FirstSortedValue(Type,LineNo) as Type,
Sum(Value) as Value,Min(LineNo) as LineNo
Resident Temp
Group By ReceiptCode,Type;
Drop Table
Temp;

Regards,

Antonio