Forum Discussion
PowerQuery transform rows
- 1 year ago
Hi coffeexyz ,
Yes, you can achieve this transformation in Power Query without having to manually split the Alt UOMs into separate tables. What you need is a self-join approach, where you join the table to itself based on matching ITEM #, then filter out combinations where the Alt UOM values are the same or already repeated in reverse.This method allows you to generate all possible unique pairings of Alt UOMs per item and display them in the format you’re aiming for (e.g., "EA to FT2", "FT2 to PAL", etc.). After the self-join, you can use a conditional column or custom column to format the output string (e.g., [Alt UOM] & " to " & [Alt UOM.1]), then remove unnecessary columns. This way, you dynamically generate all conversions per item without needing separate tables for each UOM, keeping your transformation clean and scalable. Let me know if you'd like the exact Power Query steps or M code for this logic.
there is no discernible logic to your transformation request. Please provide some more detail on how you get to the expected result.