Forum Discussion
Generate Part Number Configurations Using Power Query
- 1 year ago
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:
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:
- A sample of the input data in table format (not as screenshots)
- 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 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:
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.
Hi,
Thanks for your interest and resposne to my query. If I'm following you're approach correctly the configuration list only generates a table for No. 0 washers? So another table is required for No. 2 etc.
I'm trying to generate one table of all the combinations of configurations.
For example,
No. 0 - GN016P etc.
No. 2 - GN216P etc.
No. 3 - GN316P etc.
Is this possible?
Thanks
- v-kpoloju-msft1 year agoCommunity Support
Hi TessMissy,
Thank you for reaching out to the Microsoft fabric community forum. I reproduced the scenario again, and it worked on my end. I used my sample data and successfully implemented it.
Outcome:I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.