Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am currently taking in the following table into Qlikview
I want to add a formula in the Script so that Qlikview Calculates Pallet Config which is Layer Qty 10 and Pallet Qty 120 to give me a result of 10/120
Like this for example:
Data:
LOAD * INLINE [
Product, Name, Qty
1, Layer Qty, 10
1, Pallet Qty, 120
2, Layer Qty, 20
2, Pallet Qty, 80
];
join
load Product, concat(Qty,'/') as [Pallet Config]
resident Data
group by Product;
If necessary you can add a sort criterium to the concat function as third parameter.
Can you please explain the logic a bit more? may be a bigger size data sample would help. it seems that, you have to use some inter-records function like PEEK or PREVIOUS to achieve that.
Thanks.
I will always have 2 rows for each product
Each row contains Pallet Qty and Layer Qty in the fields Name and Qty
I want to Join Pallet Qty and Layer Qty as one field called Pallet Config
I don't need more data to explain what I require, hope you can help
Like this for example:
Data:
LOAD * INLINE [
Product, Name, Qty
1, Layer Qty, 10
1, Pallet Qty, 120
2, Layer Qty, 20
2, Pallet Qty, 80
];
join
load Product, concat(Qty,'/') as [Pallet Config]
resident Data
group by Product;
If necessary you can add a sort criterium to the concat function as third parameter.
try this
table1:
LOAD * INLINE [
product, name, quantity
1, layer qty, 10
1, pallet qty, 120
2, layer qty, 20
2, pallet qty, 80
];
LOAD product,
min(quantity) & '/' & max(quantity) as [pallet config]
Resident table1
group by product;
In Straight table--
Dimension-- product
name
quantity
Expression-- [pallet config]
then output like this
product | name | quantity | [pallet config] |
- | |||
1 | layer qty | 10 | 10/120 |
1 | pallet qty | 120 | 10/120 |
2 | layer qty | 20 | 20/80 |
2 | pallet qty | 80 | 20/80 |
Thank you that's what I need