Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Colleagues, I'm trying to get the max string week depending on the column great than 0.
Basically I want to know the last week shipped in my in the example below of Product A, Plant 1, the last shipment week 22. The combination is important since I'm going to have different products and plant.
It would be great if somebody can assist with some example expression that cover this aspect. My difficult is to see the column with the last quantity shipped with value great than 0. The new column will assist me with more calculations.
Thanks in advance,
Leandro Duarte
Example of data:
Product | Plant | Week | Qty Shipped | Max Shipped (desired result) | Consumption |
A | 1 | 2017/19 | 10 | 2017/22 | 5 |
A | 1 | 2017/20 | 20 | 2017/22 | 10 |
A | 1 | 2017/21 | 0 | 2017/22 | 5 |
A | 1 | 2017/22 | 15 | 2017/22 | 5 |
A | 1 | 2017/23 | 0 | 2017/22 | 5 |
A | 1 | 2017/24 | 0 | 2017/22 | 5 |
Attached is the Qlikview as example
Thanks in advance,
Leandro Duarte
May be this
=MaxString(TOTAL <Product, Plant> If([Qty Shipped] > 0, Week))
May be this
=MaxString(TOTAL <Product, Plant> If([Qty Shipped] > 0, Week))