Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Combine 2 Values to create 1 Value

I am currently taking in the following table into Qlikview

DataSet.png

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

DataSet2.png

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
tresesco
MVP
MVP

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.

rustyfishbones
Master II
Master II
Author

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

Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand
Not applicable

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

productnamequantity[pallet config]



-
1layer qty1010/120
1pallet qty12010/120
2layer qty2020/80
2pallet qty8020/80
rustyfishbones
Master II
Master II
Author

Thank you that's what I need