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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Costan08
Regular Visitor

Power query expanding alphanumeric range.

Hello,

 

I have recently discovered that Power Query could potentially take care of this.

 

I have a product catalogue where a range of codes are 'grouped' in a single cell, expressed as 'Lowest number' '-' 'highest number'. This is not true for all rows in the column.

 

As the list is over 1100 rows long, is there a way to automatically detect the cells containing ranges and expand them so that every code is individually listed in the range order? I am unable to do so succesfully as some of the values in the list are alphanumeric. 

 

Even tough some ranges are alphanumeric, the letters do not determine the order withing that range. (Example: JAB09HB02-JAB09HB19). 

 

Here's the link to the file for the specific table:

 

https://ioves-my.sharepoint.com/:x:/p/nico/EXmtP4FRRe5BnDfUukVYewABC_KzIE3XYYDPDt1zLiUMXg?e=Kiyv13 

 

Thank you!

3 REPLIES 3
HotChilli
Super User
Super User

OK, it's the Range Colori column?

If you split the column(right-click, Split Column By Delimiter) on '-', you will get 2 columns which you can rename 'start' and 'end' and then you can add another column similar to:

{[Range colori._start]..[Range colori_end]}    to generate a list that represents the range.  This will work for number types.

For the alphanumeric you will have to strip the letter out (You probably want to put it in another column so it doesn't get lost - so you can do this with one of the options in SplitColumnByDelimiter).

You will have to decide what you want to do once you have the range in a list. Either generate a text value with all the codes or expand to new rows.

 

Costan08
Regular Visitor

Hello,

 

Try this link:

 

https://we.tl/t-856jx1jNH5 

HotChilli
Super User
Super User

I don't see anything like that in the attached data.  Can you check it please?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors