Forum Discussion

GuilleATT's avatar
GuilleATT
Frequent Visitor
5 years ago
Solved

Count elements of Lists

Hi,

 

I have a table with Lists for each row and I would like to count the number of elements that each List has, see image:

 
 

= Table.Group(#"Filtered Rows", {"OpportunityId"}, {{"Count", each List.Distinct([LoB]), type nullable Int64.Type}})

 

Thank you,

 

Guillermo

  • Anonymous's avatar
    Anonymous
    5 years ago

    if you need only the count of distinct [Lob]element of groups, change the expression in this way

     

    = Table.Group(#"Filtered Rows", {"OpportunityId"}, {{"Count", each List.Count(List.Distinct([LoB])), type nullable Int64.Type}})

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    if you need only the count of distinct [Lob]element of groups, change the expression in this way

     

    = Table.Group(#"Filtered Rows", {"OpportunityId"}, {{"Count", each List.Count(List.Distinct([LoB])), type nullable Int64.Type}})