Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following example data within the field "App Name":
ApplicationName ApplicationName v0.01 ApplicationName _v01 ApplicationName2 ApplicationName vs. ApplicationName
Now i want to place a filter on my worksheet to filter different versions. So my filter should only contain entries like v01, v0.01,v12.12 etc.
I've tried a lot up to now but nothing really works.
With :
if("App Name" like '*v*.*',Subfield(Right("App Name",5),' ',-1),'eine version') AS Version,
i get all of the versions but also "nName" of "ApplicationName vs. ApplicationName".
I then tried:
if("App Name" like '*v*.*',if(isNum(num#(Subfield("App Name",'v',-1),'*.*')),Subfield("App Name",'v',-1),'eine version')) AS Version,
but this wont work at all.
Is there a nice way to tell Qlik Sense like look if there is something like v0.10 and then only take this and put it into a field"?
I now used the following:
if("App Name" like '*v*.*', if(FindOneOf(keepchar(Subfield("App Name",'v',-1),'0123456789v.()'),'0123456789')<>0,keepchar(Subfield("App Name",'v',-1),'0123456789v.()'),'only one Version'),'only one Version') AS Version,
This works pretty well up till now, but as @Vegar said, the best way to solve is to generalize the naming of my apps.
Try the following script. It will return data like in the table below.
LOAD
* , alt(num(mid(App,index(App, 'v', -1)+1)), dual('N/A', 0)) as Version Inline [ App ApplicationName ApplicationName v0.01 ApplicationName _v01 ApplicationName2 ApplicationName vs. ApplicationName ];
Based on your input data provided... which one of the app names should display a version and which one would display null?
I now used the following:
if("App Name" like '*v*.*', if(FindOneOf(keepchar(Subfield("App Name",'v',-1),'0123456789v.()'),'0123456789')<>0,keepchar(Subfield("App Name",'v',-1),'0123456789v.()'),'only one Version'),'only one Version') AS Version,
This works pretty well up till now, but as @Vegar said, the best way to solve is to generalize the naming of my apps.