Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Input Edit

Hello all,

I have a file which I need to strip off a percentage.  The format can be 1/100% or 25/25% or 11/100%.  I only need the whole number at the beginning, but sometimes it can be 1 position and other times it can be 2 positions.  Any ideas?

Thanks

1 Solution

Accepted Solutions
fkeuroglian
Partner - Master
Partner - Master

Hi, you can use SUBFIELD function

subfield(Field, ';' ,2)

gives:

'cde' if Field is 'abc;cde;efg'

in you case:

subfield(Field, '/' ,1)

would return the first part before the first /

good luck

Fernando

View solution in original post

2 Replies
fkeuroglian
Partner - Master
Partner - Master

Hi, you can use SUBFIELD function

subfield(Field, ';' ,2)

gives:

'cde' if Field is 'abc;cde;efg'

in you case:

subfield(Field, '/' ,1)

would return the first part before the first /

good luck

Fernando

tmumaw
Specialist II
Specialist II
Author

Thank you Fernando.  That worked perfectly.  Have a great weekend.