Forum Discussion

Tmk123's avatar
Tmk123
Helper II
2 years ago
Solved

Same SKU - hand typed different

Hi,    Are there any features in Power BI (or Excel) that will allow me to identify the same SKU if it is typed differently?  I could do this by hand but I have 550 lines to go through.  I am tryin...
  • Vijay_A_Verma's avatar
    2 years ago

    Use this step. Replace #"Changed Type" with your previous step

    = Table.Group(Table.TransformColumns(#"Changed Type",{"SKU", each Text.BeforeDelimiter(_&" ", List.Difference(Text.ToList(_&" "), {"0".."9","A".."Z","a".."z"}){0})}), {"SKU"}, {{"Total Quantity", each List.Sum([Quantity])}})
  • m_dekorte's avatar
    2 years ago

    Hi Tmk123,

     

    Or maybe just create a group key... something like:

    Table.AddColumn( PrevStep, 
        "GroupKey", 
        each List.First( 
             List.Select( Text.SplitAny([SKUcolumn], " /-"), 
                each Text.Length(_)>1 
             )
        )
    )

    I hope this is helpful