powerbi - Power BI: Count the number of times a text appears in each row - Stack Overflow

admin2025-04-18  4

I have a column that shows the tickets assigned to each user. For example, User1 has "ticket2, ticket4, ticket5". User2 has "ticket1, ticket3". I want to count the number of tickets each user has. I can't use the number of words separated by commas as a criterion, for example, because User3 can have something like "ticket6, ticket7, HHGG", where HHGG stands for something else. How can I do that?

I tried converting each of the rows with the tickets into a list, to count the number of items, but I don't know how to filter the ones that I need. I used: Count = Table.AddColumn(#"Added Conditional Column2", "INC Count", each Text.Split([#"SNow#"], ","))

I have a column that shows the tickets assigned to each user. For example, User1 has "ticket2, ticket4, ticket5". User2 has "ticket1, ticket3". I want to count the number of tickets each user has. I can't use the number of words separated by commas as a criterion, for example, because User3 can have something like "ticket6, ticket7, HHGG", where HHGG stands for something else. How can I do that?

I tried converting each of the rows with the tickets into a list, to count the number of items, but I don't know how to filter the ones that I need. I used: Count = Table.AddColumn(#"Added Conditional Column2", "INC Count", each Text.Split([#"SNow#"], ","))

Share Improve this question asked Jan 30 at 9:31 Florencia LunaFlorencia Luna 132 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

If your data size is relatively small you could try adding a custom column with the code:

List.Count(Text.PositionOf([Test], "ticket", Occurrence.All))

转载请注明原文地址:http://anycun.com/QandA/1744929121a89624.html