Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
New-here1
Contributor III
Contributor III

Data Splitting

Hi Y'all

In one field I have a breakdown of various task numbers. There are two types of numbers; a number (for example 500) which relates to the main task and a number (for example 500.1, 500.2, ect) which relates to the sub task.

I would like to split these out so I can have one column that shows the main task number, and a column that show the sub task number. 

What is the best way to do this please?

Thank you

Labels (4)
1 Reply
Chanty4u
MVP
MVP

Try this ways 

LOAD

    TaskNumber as MainTaskNumber,

    Subfield(TaskNumber, '.') as SubTaskNumber

FROM YourDataSource;

 

Or

LOAD

    TaskNumber as MainTaskNumber,

    Right(TaskNumber, Len(TaskNumber) - Index(TaskNumber, '.')) as SubTaskNumber

FROM YourDataSource;