Discussion Board for collaboration related to QlikView Deployment.
i have a table structured as below and i want to find the greatest version for each program, so for program 1 the greatest(leatest) version is 3.2.9 and for program 2 is 3.1.0.
How can i achieve this result ?
Go to Solution.
I guess, this should work:
SubField(Version,'.',1) as V1,
SubField(Version,'.',2) as V2,
SubField(Version,'.',3) as V3 Inline [
LastValue(Version) as Version2
Resident Input Group By Program Order By Program, V1, V2, V3;
DROP Table Input;
create straight table
this is the solution that i have tried first but as you can see below, it doesn't work (max version is 2.13.3).
I would like to reach the result during load script.
maybe like this
LOAD Program,Version, Num#(SubField(Version,'.',1)*100)+Num#(SubField(Version,'.',2)*10)+Num#(SubField(Version,'.',-1)) as NumericVersion
and in Table
Expression : FirstSortedValue(Version,-NumericVersion)
This because Version like 13.1.1
but also your solution doesn't work....
Check this to try will it worked for you
LOAD *,PurgeChar(Version,'.') as ModiVersion; LOAD * Inline [ Program,Version 1, 1.0.1 1, 3.2.9 1, 2.13.4 1, 1.9.6 1, 3.2.18 2, 3.0.12 2, 2.0.2 2, 3.1.0 2, 2.13.13 ]; On Straight Chart
Output you get this
don't you think.3.2.18 is greatest version for program 1?
Your solution doesn't work (program 2 version is wrong) and i want to display the version with dots (3.2.18 and not 3218)