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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TessMissy
New Member

Generate Part Number Configurations Using Power Query

Good Morning,

I am new to PQ and have a request to those out there with more experience using Power Query. I am requesting advice and help to generate configuration part numbers using PQ.

 

Using the standard NAS1149 (Flat Washers) as an example, the part number generated follows this format:

 

TessMissy_0-1750631834725.png

I am requesting advice on the most efficent way to generate configuration part numbers in PQ from this Standard.

Any advice or suggestions appreciated.

Thanks

5 REPLIES 5
V-yubandi-msft
Community Support
Community Support

Hi @TessMissy ,

Thanks for posting your query in the Microsoft Fabric Community.  I tried your NAS1149 part number scenario in Power Query and found a solution that matches the format you need.

Please take a look and let me know if it works for you or if you want any changes.

FYI:

Vyubandimsft_1-1750749093894.png

Used Code:

Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(
    List.Select({
        Text.From([BasicPartNumber]),
        Text.From([MaterialCode]),
        Text.From([SizeCode]),
        Text.From([OversizeCode]),
        Text.From([FinishCode])
    }, each _ <> null and _ <> ""),
    " "
))

 

For future questions, it would be helpful if you could provide:

  1. A sample of the input data in table format (not as screenshots)
  2. An example of the desired output based on that input

 

This helps ensure we can support your request more accurately. If the solution works, marking it as accepted could also assist others with similar issues.

Hi, thanks for reaching out.

What I'm attempting do is create a list of NAS1149 configurations following the naming convention detailed in the Standard. So far I have developed several queries but am struggling to put it all together.

For example I have developed a query which lists Material Codes and Finish Codes. This has been created from NAS1149 Table II.

MATERIAL CODEFINISH CODE
GP
GB
GF
DH
DK
DK2
DJ
DJ2
AH
AK
AK2
AJ
AJ2
BH
FB
FP
FF
CB
CR
EP
ER
ER2
ER3
EW
EU
EF
TH
TL
VH
VM
VW

 

I have also developed a qeury which list the Size and Thickness for each configuration. For example nominal diameter NO. 0 comes in two thicknesess 0.016" and 0.032", named N016 and N032 respectively.

NO. 0
N016
N032

 

I have devloped an output query which is a single column listing the various configurations for NO. 0 which is an amalgamation of the two tables shown above. I am trying to develop one table or column of configurations listing Material Code, Thickness, and Finish Code for each nominal diameter i.e., NO. 0, NO. 2. etc. 

The following table shows some configurations fo nominal diameter NO. 0. Thanks

NO. 0
GN016P
GN016B
GN016F
DN016H
DN016K
DN016K2
DN016J
DN016J2

Hi @TessMissy ,

Thank you for sharing your scenario. I reviewed your NAS1149 configuration request and developed a flexible solution in Power Query to generate part numbers in the required format.

I began by creating two base tables one for Material Finish combinations (from NAS1149 Table II), and another for Thickness codes (such as N016, N032 for Nominal Diameter No. 0).

 

To generate all valid combinations, I added a constant column called Key to both tables, enabling a Cartesian join to create all possible pairings.  Once the tables were merged, I used a custom column with this logic

[MaterialCode] & [ThicknessCode] & [FinishCode]

FYI:

Vyubandimsft_1-1750923321839.png

 

This approach dynamically creates part numbers like GN016P, DN032K, and others, based on the selected inputs.

 

Please let me know if any adjustments are needed.

 

— Yugandhar
Community Support Team.

Continued from the previous post.

 

I have been able to generate an output for one configuration at one time. I am trying to develop one complete table which identifies the various configurations for every nominal diameter.

 

Let me know if I need to add or clarify my issue.

 

Thank you

lbendlin
Super User
Super User

If your reference tables are small enough you may get away with a merge operation based on a common criteria, and a custom column that ties it all together.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors