Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to get max string with expression?

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:

ProductPlantWeekQty ShippedMax Shipped
(desired result)
Consumption
A12017/19102017/225
A12017/20202017/2210
A12017/2102017/225
A12017/22152017/225
A12017/2302017/225
A12017/2402017/225

Attached is the Qlikview as example

Thanks in advance,

Leandro Duarte

Tags (2)
1 Solution

Accepted Solutions

Re: How to get max string with expression?

May be this

=MaxString(TOTAL <Product, Plant> If([Qty Shipped] > 0, Week))

1 Reply

Re: How to get max string with expression?

May be this

=MaxString(TOTAL <Product, Plant> If([Qty Shipped] > 0, Week))

Community Browser