Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Here is a simplified task I am facing now.
Lets say we have two tables in the datamodel.
Table1: Items
| Item No | Description | Stock |
|---|---|---|
| A001 | Candle | 100 |
| A002 | Cleanser | 50 |
| C001 | Candle Component | 40 |
| C002 | Cleanser Component 1 | 20 |
| C003 | Cleanser Component 2 | 10 |
Table2: ItemComponents
| Item No | Component Item No |
|---|---|
| A001 | C001 |
| A002 | C002 |
| A002 | C003 |
Items are made of component items.
Now, I want to create a straight table like below in Qlikview:
| Item No | Component Item No | Item Stock | Component Stock |
|---|---|---|---|
| A001 | C001 | 100 | 40 |
| A002 | C002 | 50 | 20 |
| A002 | C003 | 50 | 10 |
Can I write an expression to get the component stock in this straight table without making changes to the data model?
Thanks.
May be
Aggr(Max(Stock) ,[Item No]) for Item Stock
and
Max({1<[Item No]={"$(=Max([Component Item No]))"}>}Stock)