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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Community Champion
Community Champion

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
Community Champion
Community Champion

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors