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: 
wassimharfoush
Partner - Contributor II
Partner - Contributor II

Subfield Function

Hi All ,


I am trying to Subfield field name State to get  state name only

The field State looks like

State

Alabama Department of rev

North Carolina Department of revenue

Georgia Stat tax Department

New Jersey Divisions of taxation


What I am trying to get is


State

Alabama

North Carolina

Georgia

New Jersey


Please advise.

Thanks

1 Solution

Accepted Solutions
MarcoWedel

Hi,

maybe one solution could be;

QlikCommunity_Thread_236646_Pic1.JPG

mapStates:

Mapping LOAD State, '@start@'&State&'@end@'

FROM [https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States] (html, codepage is 1252, embedded labels, table is [States of the United States In North America]);

tabDep:

LOAD *,

    TextBetween(MapSubString('mapStates',Department),'@start@','@end@') as State

INLINE [

    Department

    Alabama Department of rev

    North Carolina Department of revenue

    Georgia Stat tax Department

    New Jersey Divisions of taxation

];

hope this helps

regards

Marco

View solution in original post

3 Replies
MarcoWedel

Hi,

maybe one solution could be;

QlikCommunity_Thread_236646_Pic1.JPG

mapStates:

Mapping LOAD State, '@start@'&State&'@end@'

FROM [https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States] (html, codepage is 1252, embedded labels, table is [States of the United States In North America]);

tabDep:

LOAD *,

    TextBetween(MapSubString('mapStates',Department),'@start@','@end@') as State

INLINE [

    Department

    Alabama Department of rev

    North Carolina Department of revenue

    Georgia Stat tax Department

    New Jersey Divisions of taxation

];

hope this helps

regards

Marco

wassimharfoush
Partner - Contributor II
Partner - Contributor II
Author

Thank you Marco !

MarcoWedel

you're welcome

regards

Marco