Forum Discussion

RaMa87's avatar
RaMa87
Copper Contributor
Nov 13, 2019
Solved

Power Query: Count specific values in a column

Hi all, I have a list in a Power Query with a column which contains text like this:   A1->1 C1->2 B1->3 D1->4 E1->5 G1->6 F1->7 H1->8 A2->9 B2->11   I would need a command which counts all '>' i...
  • SergeiBaklan's avatar
    SergeiBaklan
    Nov 14, 2019

    RaMa87 

    You may add custom column with this formula

    Generated script will be

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Added Custom" = Table.AddColumn(
            Source,
            "NumberOfSeparators",
            each List.Count(Text.Split([A],">"))-1)
    in
        #"Added Custom"

    Please check the sample in attached file.