Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Tables / Scripting

I have data which looks similar to this.

  

PlantStoreCityVehicleFreightValid_from
P1S1C1V110001.Jan.14
P1S1C1V27501.Jan.15
P1S1C1V15001.Jan.15
P2S2C1V17501.Jan.15
P2S2C1V210001.Jan.14


I need to take the "Freight" for a combination of "Plant", "Store" and "City" ("Vehicle" not required)

That "Freight" which has latest "Valid_from" and which is the Maximum in case of repetition.


For eg:

In the above scenario, for P1 - S1 - C1, there are 3 freights.

1st is valid from 01.Jan.2014 while 2nd and 3rd from 01.Jan.2015.

Among the last 2, there are 2 different Vehicles V1 and V2. I need to take the Maximum of the two .i.e., 75.


Any help is extremely appreciated.



Regards

Raghav





Labels (1)
4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw


talk is cheap, supply exceeds demand
francoiscave
Partner - Creator III
Partner - Creator III

Hi Raghav,

See the attached file to get the solution.

Best Regards,

François

francoiscave
Partner - Creator III
Partner - Creator III

Hi Ragghav,

Have you find a solution ?

If your are satisfied by a response, please mark it as correct or helpful to close this tread.

If not, how can we help you?

Thanks,

François

Not applicable
Author

Hi François,

Thanks for your reply. But I still am to access my system. Will reply as

soon as I check please.

Thanks again for your immediate response

Regards

Raghav