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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
misiek5510
Helper III
Helper III

Calculating number for a specific string length

I have a table with a column SSCC. I need to calculate potential pallet numbers which could be 10 up to 13 digits long as well as could be seperated by a comma or space.  Ideally the calculation would be a calculated column.

 

In below example Prod 1 would have 3 pallets, and prod 2 would have 5 pallets. Any suggestions ? 

 

ProdReasonSSCCPartSize
1ON

2539683712843,

5454365765 

6546456457457

YERTY44XX32
2OFF

6542454364656

6436565465465,

656546456456

6436346436363,

6363656546456

UMUG1X0XX16
3 REPLIES 3
misiek5510
Helper III
Helper III

Sure here is the issue. 

 

A table we use has column names SSCC which stands for a pallet number. A single row might have multiple pallet numbers separated by comma or by space, and pallet numbers could be from 10 to 13 digits long. 

 

The below example show product 1 and 2. We can see that product 1 is made up of 3 pallets and product 2 is made of 5 pallets. What is worth nothing is that the pallets are in one cell are sometimes separated by comma and sometimes by space and are 10-13 digits long. 

 

The output I'd like to get is to put column products in a table and the calculated column with the count of pallets. 

 

 

ProductSSCC (Pallet numbers)
1

2539683712843,

5454365765 

6546456457457

2

6542454364656

6436565465465,

656546456456

6436346436363,

6363656546456

Thanks for additional info.

Try this ...

In Power Query

Replace all spaces with a comma in the pallet column. This will make all delimiters commas

Then in the Transform menu use the Split column by delimiter (comma) into rows.

Please click the accept as solution button. Thanks.

speedramps
Super User
Super User

We want to help you but your description is too vaugue. Please write it again clearly.

Provide example input data ecataly as it is on the source system 

Also provide the example desired output, with a clear step-by-step descriptions of the calculations and process flow.

Remove any unneeded columns which may cause confussion.

Rename columns to user friendly names.

Remember not to share private data ... we don't want you to get into trouble. 😧
Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.
Try keep it simple and ask one question per ticket.
You will get a quick response if you put time, care and effort into writing clear problem descriptions.
Remember you are gerrting free expert help, so please put lots of proper effort to asking questions and providing example.

Vaugue descriptions can waste your time and ourtime.

Look foward to helping you when the above information is forthcoming

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.