Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
sunny_talwar

May be this

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

View solution in original post

1 Reply
sunny_talwar

May be this

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

View solution in original post