Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Splitting the columns by Position and Length

I have a file that needs to be parsed by position and lenght of text split into columns 

           AT DATE 20-02-2020
18:00 045987 $30 56798 TRANS_SUCCESS
18:20 042397 $10.20 56798 TRANS_SUCCESS
               AT DATE 25-03-2020
18:10 045987 $13 56794 TRANS_SUCCESS
18:20 042397 $11.20 56791 TRANS_SUCCESS

 

Following are the Spec

  Header :

   AT DATE - Position 20 length 08 , Date (20-02-2020,25-03-2020) Positon :25, length 10

 Details :

   Time (18:00,18:20,18:10,18:20) - Positon 5 Length 5,

   tranactionID(045987,042397,..) :Position 12 length 7,

    Amount ($30,$10,$13 etc) :Postion 21 length 3 ,

    Receipt ID (56794,56791 etc) Postition 24, length 5

 

Can I split the column by position and length using one Column Splitter . 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I solved it by using ...

 

Splitter.SplitTextByRanges({{25,10},{5,5},{12,7},{21,3},{24,5}},false), {"AT DATE", "Time","TransactionID","Amount","Receipt"})

 

Thanks 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I solved it by using ...

 

Splitter.SplitTextByRanges({{25,10},{5,5},{12,7},{21,3},{24,5}},false), {"AT DATE", "Time","TransactionID","Amount","Receipt"})

 

Thanks 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors